-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A singleton wrapper for the `path` library.
--
-- This library wraps the types in the path library with
-- singleton types to allow more well-typed handling of file and
-- directory paths.
@package path-sing
@version 0.1.0.0
module Path.Sing
-- | A DataKind that indicates whether the path is absolute or relative.
data Base
Abs :: Base
Rel :: Base
-- | A DataKind that indicates whether the path reveals a file or a
-- directory.
data FsType
File :: FsType
Dir :: FsType
-- | Mapping to the tag representing the path's base in the Path library.
type family PathBase b
-- | Mapping to the tag representing the path's type in the Path library.
type family PathFsType t
-- | A singleton tag that indicates whether the path is absolute or
-- relative.
data SBase b
[SAbs] :: SBase 'Abs
[SRel] :: SBase 'Rel
-- | A singleton tag that indicates whether the path reveals a file or a
-- directory.
data SFsType t
[SFile] :: SFsType 'File
[SDir] :: SFsType 'Dir
-- | A singleton-type wrapper of the original Path type.
data Path b t
Path :: SBase b -> SFsType t -> Path (PathBase b) (PathFsType t) -> Path b t
-- | Path of some type.
data SomePath
SomePath :: Path b t -> SomePath
-- | Path of some base.
data SomeBase t
SomeBase :: Path b t -> SomeBase t
-- | Path of some type.
data SomeFsType b
SomeFsType :: Path b t -> SomeFsType b
-- | Path of some type. The difference with SomeFsType is that
-- information on whether the path is a file or directory is not
-- distinguished here and is ambiguous.
data UnknownFsType b
UnknownFsType :: SBase b -> Path (PathBase b) File -> UnknownFsType b
-- | Convert to a String.
pathToString :: Path b t -> String
-- | Append two paths.
(>) :: Path b 'Dir -> Path 'Rel t -> Path b t
-- | Reinterpret file paths as directory paths. It is also the operation of
-- adding a / at the end.
fileToDirPath :: forall b. Path b 'File -> Path b 'Dir
instance Data.Hashable.Class.Hashable (Path.Sing.Path b t)
instance GHC.Classes.Eq (Path.Sing.Path b t)
instance GHC.Generics.Generic (Path.Sing.Path b t)
instance GHC.Show.Show (Path.Sing.SBase b)
instance GHC.Classes.Eq (Path.Sing.SBase b)
instance GHC.Show.Show (Path.Sing.SFsType t)
instance GHC.Classes.Eq (Path.Sing.SFsType b)
instance Data.Hashable.Class.Hashable (Path.Sing.SFsType b)
instance Data.Hashable.Class.Hashable (Path.Sing.SBase b)