Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype PathTo entity pk t = PathTo {}
- type family ToSubpath a where ...
- retagPath :: PathTo p b t -> PathTo p' (Retagged b) t
- data Base k
- type family Untag pk where ...
- type Abs = 'Abs
- type RelTo = 'RelTo
- data File
- data Dir
- type family Unknown where ...
- data Subpath k
- type family EntryOf k where ...
- type Entry = 'Entry
- type Parent = 'Parent
- type ParentOf e = 'Parent ('Entry e)
- data SomeBase e b t
- untagSomeBase :: SomeBase e b t -> SomeBase t
- data PathException
- absdir :: QuasiQuoter
- reldir :: QuasiQuoter
- absfile :: QuasiQuoter
- relfile :: QuasiQuoter
- (</>) :: PathTo parent b Dir -> PathTo child (RelTo parent) t -> PathTo child b t
- stripProperPrefix :: MonadThrow m => PathTo p b Dir -> PathTo l b t -> m (PathTo l (RelTo p) t)
- isProperPrefixOf :: PathTo p b Dir -> PathTo l b t -> Bool
- replaceProperPrefix :: MonadThrow m => PathTo parent b Dir -> PathTo parent' b' Dir -> PathTo child b t -> m (PathTo child b' t)
- replaceProperPrefix' :: MonadThrow m => PathTo parent b Dir -> PathTo parent b' Dir -> PathTo child b t -> m (PathTo child b' t)
- parent :: PathTo e b t -> PathTo (ParentOf e) (ToSubpath b) Dir
- filename :: PathTo e b File -> PathTo (Entry e) (RelTo (ParentOf e)) File
- dirname :: PathTo e b Dir -> PathTo (Entry e) (RelTo (ParentOf e)) Dir
- addExtension :: forall e' m e b. MonadThrow m => String -> PathTo e b File -> m (PathTo e' b File)
- splitExtension :: forall e' m e b. MonadThrow m => PathTo e b File -> m (PathTo e' b File, String)
- fileExtension :: MonadThrow m => PathTo e b File -> m String
- replaceExtension :: forall e' m e b. MonadThrow m => String -> PathTo e b File -> m (PathTo e' b File)
- mapSomeBase :: (forall c. PathTo e c t -> PathTo e' c t') -> SomeBase e b t -> SomeBase e' b t'
- prjSomeBase :: (forall c. PathTo e c t -> a) -> SomeBase e b t -> a
- parseAbsDir :: forall e m. MonadThrow m => FilePath -> m (PathTo e Abs Dir)
- parseRelDir :: forall e b m. MonadThrow m => FilePath -> m (PathTo e (RelTo b) Dir)
- parseAbsFile :: forall e m. MonadThrow m => FilePath -> m (PathTo e Abs File)
- parseRelFile :: forall e b m. MonadThrow m => FilePath -> m (PathTo e (RelTo b) File)
- parseSomeDir :: MonadThrow m => FilePath -> m (SomeBase e b Dir)
- parseSomeFile :: MonadThrow m => FilePath -> m (SomeBase e b File)
- toFilePath :: PathTo e b t -> FilePath
- fromAbsDir :: PathTo e Abs Dir -> FilePath
- fromRelDir :: PathTo e (RelTo b) Dir -> FilePath
- fromAbsFile :: PathTo e Abs File -> FilePath
- fromRelFile :: PathTo e (RelTo b) File -> FilePath
- fromSomeDir :: SomeBase e b Dir -> FilePath
- fromSomeFile :: SomeBase e b File -> FilePath
- mkAbsDir :: FilePath -> ExpQ
- mkRelDir :: FilePath -> ExpQ
- mkAbsFile :: FilePath -> ExpQ
- mkRelFile :: FilePath -> ExpQ
- mkAbsDirT :: FilePath -> SpliceQ (PathTo e Abs Dir)
- mkRelDirT :: FilePath -> SpliceQ (PathTo e (RelTo b) Dir)
- mkAbsFileT :: FilePath -> SpliceQ (PathTo e Abs File)
- mkRelFileT :: FilePath -> SpliceQ (PathTo e (RelTo b) File)
Types
newtype PathTo entity pk t Source #
Instances
A file path.
Instances
A directory path.
Instances
Special Entity Tags
Instances
untagSomeBase :: SomeBase e b t -> SomeBase t Source #
Exceptions
data PathException #
Exceptions that can occur during path operations.
Since: path-0.6.0
Instances
Exception PathException | |
Defined in Path.Posix | |
Show PathException | |
Defined in Path.Posix showsPrec :: Int -> PathException -> ShowS # show :: PathException -> String # showList :: [PathException] -> ShowS # | |
Eq PathException | |
Defined in Path.Posix (==) :: PathException -> PathException -> Bool # (/=) :: PathException -> PathException -> Bool # |
QuasiQuotes
absdir :: QuasiQuoter Source #
reldir :: QuasiQuoter Source #
Operations
stripProperPrefix :: MonadThrow m => PathTo p b Dir -> PathTo l b t -> m (PathTo l (RelTo p) t) Source #
replaceProperPrefix :: MonadThrow m => PathTo parent b Dir -> PathTo parent' b' Dir -> PathTo child b t -> m (PathTo child b' t) Source #
replaceProperPrefix' :: MonadThrow m => PathTo parent b Dir -> PathTo parent b' Dir -> PathTo child b t -> m (PathTo child b' t) Source #
addExtension :: forall e' m e b. MonadThrow m => String -> PathTo e b File -> m (PathTo e' b File) Source #
splitExtension :: forall e' m e b. MonadThrow m => PathTo e b File -> m (PathTo e' b File, String) Source #
fileExtension :: MonadThrow m => PathTo e b File -> m String Source #
replaceExtension :: forall e' m e b. MonadThrow m => String -> PathTo e b File -> m (PathTo e' b File) Source #
mapSomeBase :: (forall c. PathTo e c t -> PathTo e' c t') -> SomeBase e b t -> SomeBase e' b t' Source #
prjSomeBase :: (forall c. PathTo e c t -> a) -> SomeBase e b t -> a Source #
Parsing
parseAbsDir :: forall e m. MonadThrow m => FilePath -> m (PathTo e Abs Dir) Source #
parseRelDir :: forall e b m. MonadThrow m => FilePath -> m (PathTo e (RelTo b) Dir) Source #
parseAbsFile :: forall e m. MonadThrow m => FilePath -> m (PathTo e Abs File) Source #
parseRelFile :: forall e b m. MonadThrow m => FilePath -> m (PathTo e (RelTo b) File) Source #
parseSomeDir :: MonadThrow m => FilePath -> m (SomeBase e b Dir) Source #
parseSomeFile :: MonadThrow m => FilePath -> m (SomeBase e b File) Source #
Conversion
toFilePath :: PathTo e b t -> FilePath Source #