Skip to content

Commit

Permalink
upgrade horizon
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Sydney Kerckhove committed Oct 12, 2024
1 parent 750e97e commit db0c995
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 69 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
96 changes: 48 additions & 48 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion path/path.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions path/src/OsPath/Include.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
--
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion path/src/OsPath/Internal/Include.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down
12 changes: 6 additions & 6 deletions path/src/Path/Include.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion path/src/Path/Internal/Include.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
--
Expand Down

0 comments on commit db0c995

Please sign in to comment.