| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
BuildEnv.Path
Synopsis
- type SymbolicPath = SymbolicPathX 'AllowAbsolute
- type RelativePath = SymbolicPathX 'OnlyRelative
- data AbsolutePath to
- data FileOrDir
- data CWD
- data Pkg
- data PkgDb
- data Project
- data Tmp
- data Logs
- data Fetch
- data Prefix
- data Install
- sameDirectory :: SymbolicPathX allowAbsolute from to
- mkSymbolicPath :: FilePath -> SymbolicPath from to
- mkRelativePath :: FilePath -> RelativePath from to
- mkAbsolutePath :: FilePath -> AbsolutePath to
- interpretSymbolicPath :: SymbolicPath CWD (Dir dir) -> SymbolicPathX allowAbsolute dir to -> FilePath
- getSymbolicPath :: SymbolicPathX allowAbsolute from to -> FilePath
- getAbsolutePath :: AbsolutePath to -> FilePath
- absoluteSymbolicPath :: AbsolutePath to -> SymbolicPath from to
- makeAbsolute :: SymbolicPath CWD (Dir dir) -> SymbolicPath dir to -> IO (AbsolutePath to)
- (<.>) :: FileLike p => p -> String -> p
- (</>) :: PathLike p q r => p -> q -> r
Documentation
type SymbolicPath = SymbolicPathX 'AllowAbsolute Source #
A path which is either absolute or relative to the given abstract*
location specified by the from type parameter.
They are *symbolic*, which means we cannot perform any IO
until we interpret them (using e.g. interpretSymbolicPath).
type RelativePath = SymbolicPathX 'OnlyRelative Source #
A symbolic relative path, relative to an abstract location specified
by the from type parameter.
They are *symbolic*, which means we cannot perform any IO
until we interpret them (using e.g. interpretSymbolicPath).
data AbsolutePath to Source #
An absolute path, or a reference to a path from the PATH environment variable.
Instances
| Show (AbsolutePath to) Source # | |
Defined in BuildEnv.Path Methods showsPrec :: Int -> AbsolutePath to -> ShowS # show :: AbsolutePath to -> String # showList :: [AbsolutePath to] -> ShowS # | |
A type-level symbolic name, to an abstract file or directory (e.g. the Cabal package directory).
Abstract directory: package directory (e.g. a directory containing the .cabal file).
Abstract directory: package database directory (e.g. a directory containing a package.conf file).
sameDirectory :: SymbolicPathX allowAbsolute from to Source #
mkSymbolicPath :: FilePath -> SymbolicPath from to Source #
mkRelativePath :: FilePath -> RelativePath from to Source #
mkAbsolutePath :: FilePath -> AbsolutePath to Source #
interpretSymbolicPath :: SymbolicPath CWD (Dir dir) -> SymbolicPathX allowAbsolute dir to -> FilePath Source #
Interpret a symbolic path with respect to the given directory.
Use this function before directly interacting with the file system in order to take into account a working directory argument.
getSymbolicPath :: SymbolicPathX allowAbsolute from to -> FilePath Source #
getAbsolutePath :: AbsolutePath to -> FilePath Source #
absoluteSymbolicPath :: AbsolutePath to -> SymbolicPath from to Source #
makeAbsolute :: SymbolicPath CWD (Dir dir) -> SymbolicPath dir to -> IO (AbsolutePath to) Source #
Make the given SymbolicPathX absolute.