diff --git a/README.md b/README.md index b753c8b..23ec023 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Here is the type: ```haskell newtype Path b t = Path FilePath - deriving (Data, Typeable, Generic) + deriving (Data, Generic) ``` The type variables are: @@ -102,15 +102,15 @@ The type variables are: The base types can be filled with these: ```haskell -data Abs deriving (Typeable) -data Rel deriving (Typeable) +data Abs +data Rel ``` And the type can be filled with these: ```haskell -data File deriving (Typeable) -data Dir deriving (Typeable) +data File +data Dir ``` (Why not use data kinds like `data Type = File | Dir`? Because that imposes diff --git a/flake.lock b/flake.lock index c67bdcb..1d861df 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -39,11 +39,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "type": "github" }, "original": { @@ -85,11 +85,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1719751316, - "narHash": "sha256-exJ80zZPyiSxiYQb4IreK7LDpjfBLOCPb77QUn3TGR8=", + "lastModified": 1728731176, + "narHash": "sha256-BMlGwamx9DGPK2sZUcHBaIxxF5NrvmxEojLVQnlFIP0=", "ref": "refs/heads/master", - "rev": "36784235da4dd828b3e139a855dc8410fff91376", - "revCount": 259, + "rev": "8c130d28aff2973045540361c34112a6fdb49db0", + "revCount": 267, "type": "git", "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" }, @@ -111,11 +111,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1718969469, - "narHash": "sha256-0Q8v/yNwcLZy0znegLXx/SQmbfd2d/4TBSrFYh7g7+0=", + "lastModified": 1727953000, + "narHash": "sha256-X87uDIiVm8ele4o53FaKKm9PvI4fdfqpQyea6LWxexI=", "ref": "refs/heads/master", - "rev": "23fa82740dc197706a3737c8830b724ccabafac4", - "revCount": 96, + "rev": "dfc1cfe14f6f3e156b800c55dced4c211aa328f4", + "revCount": 104, "type": "git", "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages" }, @@ -132,11 +132,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1718977916, - "narHash": "sha256-sssWF/XjZga4asgwvovPLAbg8E2EyLDQOYSFgUbKg6c=", + "lastModified": 1728019357, + "narHash": "sha256-8FB4varne9uSaq6S22470RKWIuZZRVm7tzMa+mlc1vA=", "ref": "refs/heads/master", - "rev": "81674e75e63548341ebe0cb94127044255affb55", - "revCount": 1375, + "rev": "6e77e3b661ecb7318332f510f1c85480df7cda88", + "revCount": 1383, "type": "git", "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" }, @@ -151,11 +151,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1718969245, - "narHash": "sha256-eeMsOK3Hmm23SH45GdbuWRtpEcMWZPC/JCYvKL2LOos=", + "lastModified": 1727952319, + "narHash": "sha256-oh2st42snuv44c7/Pga/obgVG87alRoWywKZ60Bf0V8=", "ref": "refs/heads/master", - "rev": "0bcfe994903359aef81338915706bf6b2f38aaa4", - "revCount": 109, + "rev": "f99ab296e55a80fbcfa50e2a7832b001ae1b0ba5", + "revCount": 115, "type": "git", "url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc" }, @@ -196,11 +196,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718928808, - "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "lastModified": 1726877710, + "narHash": "sha256-53Q5rKVWBYc62qS2TNOtoa6hG8820Teq0/x7olr0KUs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "rev": "93d142112e81929c5bfd20b13bc287da8922dc97", "type": "github" }, "original": { @@ -212,26 +212,26 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1717284937, - "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" } }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1717284937, - "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "nixpkgs-stable": { @@ -252,11 +252,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1718928808, - "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "lastModified": 1727914564, + "narHash": "sha256-S0KZLpF6yfX6c6ehfz2svB3VzYNJ8YxfQJH6NgyHNk8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "rev": "9d0ab8b5db9ba62989e648db86c66c0fb620b6e9", "type": "github" }, "original": { @@ -268,11 +268,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1718928808, - "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "lastModified": 1727914564, + "narHash": "sha256-S0KZLpF6yfX6c6ehfz2svB3VzYNJ8YxfQJH6NgyHNk8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "rev": "9d0ab8b5db9ba62989e648db86c66c0fb620b6e9", "type": "github" }, "original": { @@ -284,11 +284,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1719706517, - "narHash": "sha256-ynXAAr5AJgTQHQAJW4GH3i8auqnZVzcjCokZMdEKjcs=", + "lastModified": 1728000969, + "narHash": "sha256-MYiswvy74bWkXGSk+D8Hhu7Gg2iel6Tu4J3sbgC3krg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "01da4c59cc4879540b7a5d73230475b4616a0dc8", + "rev": "d4db941d790cc72a8b6867ccf85ef4e6d77e1097", "type": "github" }, "original": { @@ -300,11 +300,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1723282977, - "narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=", + "lastModified": 1728627514, + "narHash": "sha256-r+SF9AnHrTg+bk6YszoKfV9lgyw+yaFUQe0dOjI0Z2o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc", + "rev": "c505ebf777526041d792a49d5f6dd4095ea391a7", "type": "github" }, "original": { @@ -338,11 +338,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1723202784, - "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "lastModified": 1728727368, + "narHash": "sha256-7FMyNISP7K6XDSIt1NJxkXZnEdV3HZUXvFoBaJ/qdOg=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "rev": "eb74e0be24a11a1531b5b8659535580554d30b28", "type": "github" }, "original": { diff --git a/path/path.cabal b/path/path.cabal index e522a5d..2e247d9 100644 --- a/path/path.cabal +++ b/path/path.cabal @@ -74,7 +74,7 @@ library , base >= 4.12 && < 5 , deepseq , exceptions >= 0.4 && < 0.11 - , hashable >= 1.2 && < 1.5 + , hashable >= 1.2 && < 1.6 , path:os-string-compat , text , template-haskell diff --git a/path/src/OsPath/Include.hs b/path/src/OsPath/Include.hs index 3c7684d..6f8dea8 100644 --- a/path/src/OsPath/Include.hs +++ b/path/src/OsPath/Include.hs @@ -108,7 +108,7 @@ import Control.Exception (Exception(..)) import Control.Monad (unless, when, (<=<)) import Control.Monad.Catch (MonadThrow(..)) import Data.Coerce (coerce) -import Data.Data (Data, Typeable) +import Data.Data (Data) import Data.Hashable (Hashable (..)) import Data.Maybe (isJust, isNothing) import GHC.Generics (Generic) @@ -126,17 +126,17 @@ import qualified System.OsString.Compat.PLATFORM_NAME as OsString -- Types -- | An absolute path. -data Abs deriving (Typeable, Data) +data Abs deriving (Data) -- | A relative path; one without a root. Note that a @..@ path component to -- represent the parent directory is not allowed by this library. -data Rel deriving (Typeable, Data) +data Rel deriving (Data) -- | A file path. -data File deriving (Typeable, Data) +data File deriving (Data) -- | A directory path. -data Dir deriving (Typeable, Data) +data Dir deriving (Data) -- | Exceptions that can occur during path operations. -- @@ -151,7 +151,7 @@ data PathException | NotAProperPrefix PLATFORM_PATH PLATFORM_PATH | HasNoExtension PLATFORM_PATH | InvalidExtension PLATFORM_STRING - deriving (Show,Eq,Typeable) + deriving (Show,Eq) instance Exception PathException where displayException (InvalidExtension ext) = concat @@ -658,7 +658,7 @@ mkRelFile = either (fail . displayException) lift . parseRelFile -- directory. Pattern match to find whether the path is absolute or relative. data SomeBase t = Abs (Path Abs t) | Rel (Path Rel t) - deriving (Typeable, Generic, Eq, Ord) + deriving (Generic, Eq, Ord) instance NFData (SomeBase t) where rnf (Abs p) = rnf p diff --git a/path/src/OsPath/Internal/Include.hs b/path/src/OsPath/Internal/Include.hs index 765015d..18d280e 100644 --- a/path/src/OsPath/Internal/Include.hs +++ b/path/src/OsPath/Internal/Include.hs @@ -70,7 +70,7 @@ import qualified System.OsString.Compat.PLATFORM_NAME as OsString -- All directories end in a trailing separator. There are no duplicate -- path separators @\/\/@, no @..@, no @.\/@, no @~\/@, etc. newtype Path b t = Path PLATFORM_PATH - deriving (Data, Typeable, Generic) + deriving (Data, Generic) -- | String equality. -- diff --git a/path/src/Path/Include.hs b/path/src/Path/Include.hs index 151325a..7069ec4 100644 --- a/path/src/Path/Include.hs +++ b/path/src/Path/Include.hs @@ -122,17 +122,17 @@ import qualified System.FilePath.PLATFORM_NAME as FilePath -- Types -- | An absolute path. -data Abs deriving (Typeable, Data) +data Abs deriving (Data) -- | A relative path; one without a root. Note that a @..@ path component to -- represent the parent directory is not allowed by this library. -data Rel deriving (Typeable, Data) +data Rel deriving (Data) -- | A file path. -data File deriving (Typeable, Data) +data File deriving (Data) -- | A directory path. -data Dir deriving (Typeable, Data) +data Dir deriving (Data) instance FromJSON (Path Abs File) where parseJSON = parseJSONWith parseAbsFile @@ -198,7 +198,7 @@ data PathException | NotAProperPrefix FilePath FilePath | HasNoExtension FilePath | InvalidExtension String - deriving (Show,Eq,Typeable) + deriving (Show,Eq) instance Exception PathException where displayException (InvalidExtension ext) = concat @@ -853,7 +853,7 @@ normalizeFilePath -- relative. data SomeBase t = Abs (Path Abs t) | Rel (Path Rel t) - deriving (Typeable, Generic, Eq, Ord) + deriving (Generic, Eq, Ord) instance NFData (SomeBase t) where rnf (Abs p) = rnf p diff --git a/path/src/Path/Internal/Include.hs b/path/src/Path/Internal/Include.hs index aa9035b..e30a7ce 100644 --- a/path/src/Path/Internal/Include.hs +++ b/path/src/Path/Internal/Include.hs @@ -45,7 +45,7 @@ import qualified System.FilePath.PLATFORM_NAME as FilePath -- All directories end in a trailing separator. There are no duplicate -- path separators @\/\/@, no @..@, no @.\/@, no @~\/@, etc. newtype Path b t = Path FilePath - deriving (Data, Typeable, Generic) + deriving (Data, Generic) -- | String equality. --