build-env-1.2.0.0: Compute, fetch and install Cabal build plans into a local environment
Safe HaskellSafe-Inferred
LanguageHaskell2010

BuildEnv.Path

Synopsis

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

Instances details
Show (AbsolutePath to) Source # 
Instance details

Defined in BuildEnv.Path

data FileOrDir Source #

A type-level symbolic name, to an abstract file or directory (e.g. the Cabal package directory).

Constructors

File

A file (with no further information).

Dir Type

The abstract name of a directory or category of directories, e.g. the package directory or a source directory.

data CWD Source #

Abstract directory: current working directory.

data Pkg Source #

Abstract directory: package directory (e.g. a directory containing the .cabal file).

data PkgDb Source #

Abstract directory: package database directory (e.g. a directory containing a package.conf file).

data Project Source #

Abstract directory: project root for 'build-env' commands.

data Tmp Source #

Abstract temporary directory.

data Logs Source #

Abstract directory for logs.

data Fetch Source #

Abstract directory: fetched sources directory.

data Prefix Source #

Abstract directory: prefix.

data Install Source #

Abstract directory: installation directory.

sameDirectory :: SymbolicPathX allowAbsolute from 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 #

makeAbsolute :: SymbolicPath CWD (Dir dir) -> SymbolicPath dir to -> IO (AbsolutePath to) Source #

Make the given SymbolicPathX absolute.

(<.>) :: FileLike p => p -> String -> p infixr 7 Source #

Like <.>, but also supporting symbolic paths.

(</>) :: PathLike p q r => p -> q -> r infixr 5 Source #

Like </>, but also supporting symbolic paths.