stack-0.1.0.0: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Build.Types

Description

All data types.

Synopsis

Documentation

data InstallLocation Source

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

Constructors

Snap 
Local 

data ModTime Source

Used for storage and comparison.

modTime :: UTCTime -> ModTime Source

One-way conversion to serialized time.

class PackageInstallInfo a where Source

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

data Task Source

A task to perform when building

Constructors

Task 

Fields

taskProvides :: !PackageIdentifier

the package/version to be built

taskType :: !TaskType

the task type, telling us how to build this

taskConfigOpts :: !TaskConfigOpts
 
taskPresent :: !(Set GhcPkgId)

GhcPkgIds of already-installed dependencies

Instances

data LocalPackage Source

Information on a locally available package of source code

Constructors

LocalPackage 

Fields

lpPackage :: !Package

The Package info itself, after resolution with package flags, not including any final actions

lpPackageFinal :: !Package

Same as lpPackage, but with any test suites or benchmarks enabled as necessary

lpWanted :: !Bool

Is this package a "wanted" target based on command line input

lpDir :: !(Path Abs Dir)

Directory of the package.

lpCabalFile :: !(Path Abs File)

The .cabal file

lpDirtyFiles :: !Bool

are there files that have changed since the last build?

lpComponents :: !(Set Text)

components to build, passed directly to Setup.hs build

Instances

data BaseConfigOpts Source

Basic information used to calculate what the configure options are

Constructors

BaseConfigOpts 

Fields

bcoSnapDB :: !(Path Abs Dir)
 
bcoLocalDB :: !(Path Abs Dir)
 
bcoSnapInstallRoot :: !(Path Abs Dir)
 
bcoLocalInstallRoot :: !(Path Abs Dir)
 
bcoBuildOpts :: !BuildOpts
 

data Plan Source

A complete plan of what needs to be built and how to do it

Constructors

Plan 

Fields

planTasks :: !(Map PackageName Task)
 
planFinals :: !(Map PackageName Task)

Final actions to be taken (test, benchmark, etc)

planUnregisterLocal :: !(Map GhcPkgId Text)

Text is reason we're unregistering, for display only

planInstallExes :: !(Map Text InstallLocation)

Executables that should be installed after successful building

Instances

data FinalAction Source

Run a Setup.hs action after building a package, before installing.

data BuildOpts Source

Configuration for building.

Constructors

BuildOpts 

Fields

boptsTargets :: ![Text]
 
boptsLibProfile :: !Bool
 
boptsExeProfile :: !Bool
 
boptsEnableOptimizations :: !(Maybe Bool)
 
boptsHaddock :: !Bool

Build haddocks?

boptsHaddockDeps :: !(Maybe Bool)

Build haddocks for dependencies?

boptsFinalAction :: !FinalAction
 
boptsDryrun :: !Bool
 
boptsGhcOptions :: ![Text]
 
boptsFlags :: !(Map (Maybe PackageName) (Map FlagName Bool))
 
boptsInstallExes :: !Bool

Install executables to user path after building?

boptsPreFetch :: !Bool

Fetch all packages immediately

boptsTestArgs :: ![String]

Arguments to pass to the test suites if we're running them.

boptsOnlySnapshot :: !Bool

Only install packages in the snapshot database, skipping packages intended for the local database.

boptsCoverage :: !Bool

Enable code coverage report generation for test suites.

Instances

data TaskType Source

The type of a task, either building local code or something from the package index (upstream)

Instances

data TaskConfigOpts Source

Given the IDs of any missing packages, produce the configure options

Constructors

TaskConfigOpts 

Fields

tcoMissing :: !(Set PackageIdentifier)

Dependencies for which we don't yet have an GhcPkgId

tcoOpts :: !(Set GhcPkgId -> [Text])

Produce the list of options given the missing GhcPkgIds

Instances

data ConfigCache Source

Stored on disk to know whether the flags have changed or any files have changed.

Constructors

ConfigCache 

Fields

configCacheOpts :: ![ByteString]

All options used for this package.

configCacheDeps :: !(Set GhcPkgId)

The GhcPkgIds of all of the dependencies. Since Cabal doesn't take the complete GhcPkgId (only a PackageIdentifier) in the configure options, just using the previous value is insufficient to know if dependencies have changed.

configCacheComponents :: !(Set ByteString)

The components to be built. It's a bit of a hack to include this in here, as it's not a configure option (just a build option), but this is a convenient way to force compilation when the components change.

configCacheHaddock :: !Bool

Are haddocks to be built?

configureOpts Source

Arguments

:: EnvConfig 
-> BaseConfigOpts 
-> Set GhcPkgId

dependencies

-> Bool

wanted?

-> InstallLocation 
-> Package 
-> [Text] 

Render a BaseConfigOpts to an actual list of options

wantedLocalPackages :: [LocalPackage] -> Set PackageName Source

Get set of wanted package names from locals.