stack-1.3.0: The Haskell Tool Stack

Safe HaskellNone




data Package Source

Some package info.




packageName :: !PackageName

Name of the package.

packageVersion :: !Version

Version of the package

packageLicense :: !License

The license the package was released under.

packageFiles :: !GetPackageFiles

Get all files of the package.

packageDeps :: !(Map PackageName VersionRange)

Packages that the package depends on.

packageTools :: ![Dependency]

A build tool name.

packageAllDeps :: !(Set PackageName)

Original dependencies (not sieved).

packageGhcOptions :: ![Text]

Ghc options used on package.

packageFlags :: !(Map FlagName Bool)

Flags used on package.

packageDefaultFlags :: !(Map FlagName Bool)

Defaults for unspecified flags.

packageHasLibrary :: !Bool

does the package have a buildable library stanza?

packageTests :: !(Map Text TestSuiteInterface)

names and interfaces of test suites

packageBenchmarks :: !(Set Text)

names of benchmarks

packageExes :: !(Set Text)

names of executables

packageOpts :: !GetPackageOpts

Args to pass to GHC.

packageHasExposedModules :: !Bool

Does the package have exposed modules?

packageSimpleType :: !Bool

Does the package of build-type: Simple


Eq Package Source

Compares the package name.

Ord Package Source

Compares the package name.

Show Package Source 

newtype GetPackageOpts Source

Files that the package depends on, relative to package directory. Argument is the location of the .cabal file

data BuildInfoOpts Source

GHC options based on cabal information and ghc-options.




bioOpts :: [String]
bioOneWordOpts :: [String]
bioPackageFlags :: [String]

These options can safely have nubOrd applied to them, as there are no multi-word options (see

bioCabalMacros :: Maybe (Path Abs File)

data CabalFileType Source

Files to get for a cabal package.



newtype GetPackageFiles Source

Files that the package depends on, relative to package directory. Argument is the location of the .cabal file

data PackageWarning Source

Warning generated when reading a package


UnlistedModulesWarning (Maybe String) [ModuleName]

Modules found that are not listed in cabal file

data PackageConfig Source

Package build configuration




packageConfigEnableTests :: !Bool

Are tests enabled?

packageConfigEnableBenchmarks :: !Bool

Are benchmarks enabled?

packageConfigFlags :: !(Map FlagName Bool)

Configured flags.

packageConfigGhcOptions :: ![Text]

Configured ghc options.

packageConfigCompilerVersion :: !CompilerVersion

GHC version

packageConfigPlatform :: !Platform

host platform

data PackageSource Source

Where the package's source is located: local directory or package index


PSLocal LocalPackage 
PSUpstream Version InstallLocation (Map FlagName Bool) [Text] (Maybe GitSHA1)

Upstream packages could be installed in either local or snapshot databases; this is what InstallLocation specifies.

class PackageInstallInfo a where Source

Datatype which tells how which version of a package to install and where to install it into

data LocalPackage Source

Information on a locally available package of source code




lpPackage :: !Package

The Package info itself, after resolution with package flags, with tests and benchmarks disabled

lpComponents :: !(Set NamedComponent)

Components to build, not including the library component.

lpUnbuildable :: !(Set NamedComponent)

Components explicitly requested for build, that are marked "buildable: false".

lpWanted :: !Bool

Whether this package is wanted as a target.

lpTestDeps :: !(Map PackageName VersionRange)

Used for determining if we can use --enable-tests in a normal build.

lpBenchDeps :: !(Map PackageName VersionRange)

Used for determining if we can use --enable-benchmarks in a normal build.

lpTestBench :: !(Maybe Package)

This stores the Package with tests and benchmarks enabled, if either is asked for by the user.

lpDir :: !(Path Abs Dir)

Directory of the package.

lpCabalFile :: !(Path Abs File)

The .cabal file

lpForceDirty :: !Bool
lpDirtyFiles :: !(Maybe (Set FilePath))

Nothing == not dirty, Just == dirty. Note that the Set may be empty if we forced the build to treat packages as dirty. Also, the Set may not include all modified files.

lpNewBuildCache :: !(Map FilePath FileCacheInfo)

current state of the files

lpFiles :: !(Set (Path Abs File))

all files used by this package

data NamedComponent Source

A single, fully resolved component of a package


CExe !Text 
CTest !Text 
CBench !Text 

data InstallLocation Source

A location to install a package into, either snapshot or local



data DotCabalDescriptor Source

A descriptor from a .cabal file indicating one of the following:

exposed-modules: Foo other-modules: Foo or main-is: Foo.hs

dotCabalModule :: DotCabalDescriptor -> Maybe ModuleName Source

Maybe get the module name from the .cabal descriptor.

dotCabalMain :: DotCabalDescriptor -> Maybe FilePath Source

Maybe get the main name from the .cabal descriptor.

data DotCabalPath Source

A path resolved from the .cabal file, which is either main-is or an exposedinternalreferenced module.

dotCabalCFilePath :: DotCabalPath -> Maybe (Path Abs File) Source

Get the c file path.

installedVersion :: Installed -> Version Source

Get the installed Version.