-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A type safe file path data structure -- @package data-filepath @version 2.1.1.0 module Data.FilePath data Path File :: Path Directory :: Path data From Root :: From Relative :: From -- | A PathSegment is any single element of a path...i.e. the stuff between -- two '/' characters. Valid path segments cannot contain '/' or control -- characters. PathSegments are also monoids to allow mappending with -- prefixes/suffixes. data PathSegment -- | Every PathSegment is a valid string segString :: PathSegment -> String -- | Smart constructor for valid PathSegments. Valid path segments cannot -- contain front slashes or control characters. This function performs -- all the checks up front. -- -- mkPathSegment :: String -> Maybe PathSegment data FilePath (a :: From) (b :: Path) () :: FilePath a Directory -> FilePath Relative b -> FilePath a b rootPath :: FilePath Root Directory relativePath :: FilePath Relative Directory -- | Smart constructor for directories. Valid directories must be valid -- PathSegments and also cannot be empty strings. mkDirPath :: String -> Maybe (FilePath Relative Directory) -- | This function basically defines what the PathSegment type is -- semantically. It is string like thing which you can safely create a -- path from. See mkPathSegment, mkFilePathSeg mkDirPathSeg :: PathSegment -> FilePath Relative Directory -- | Smart constructor for files. Valid files must be valid PathSegments -- and also cannot be empty strings. mkFilePath :: String -> Maybe (FilePath Relative File) mkFilePathSeg :: PathSegment -> FilePath Relative File mkRootFilePathBase :: String -> Maybe (FilePath Root Directory) mkFullFilePath :: String -> Maybe (FilePath Root File) dirname :: FilePath a File -> FilePath a Directory basename :: FilePath a File -> String basenameSeg :: FilePath a File -> PathSegment showp :: FilePath a b -> String segQ :: QuasiQuoter dirpathQ :: QuasiQuoter filepathQ :: QuasiQuoter instance Typeable PathSegment instance Typeable FilePath instance Typeable 'File instance Typeable 'Root instance Typeable 'Relative instance Typeable 'Directory instance Eq PathSegment instance Show PathSegment instance Data PathSegment instance Data (FilePath 'Root 'File) instance Data (FilePath 'Relative 'File) instance Data (FilePath 'Root 'Directory) instance Data (FilePath 'Relative 'Directory) instance Show (FilePath a b) instance Semigroup PathSegment