stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Build

Description

Build the project.

Synopsis

- build :: (StackM env m, HasEnvConfig env, MonadBaseUnlift IO m) => (Set (Path Abs File) -> IO ()) -> Maybe FileLock -> BuildOptsCLI -> m ()
- withLoadPackage :: (StackM env m, HasEnvConfig env, MonadBaseUnlift IO m) => EnvOverride -> ((PackageName -> Version -> Map FlagName Bool -> [Text] -> IO Package) -> m a) -> m a
- mkBaseConfigOpts :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m) => BuildOptsCLI -> m BaseConfigOpts
- queryBuildInfo :: (StackM env m, HasEnvConfig env) => [Text] -> m ()
- splitObjsWarning :: String
- newtype CabalVersionException = CabalVersionException {
  - unCabalVersionException :: String
  }

# Documentation

build #

Arguments

:: (StackM env m, HasEnvConfig env, MonadBaseUnlift IO m) |
=> (Set (Path Abs File) -> IO ()) | callback after discovering all local files
-> Maybe FileLock |
-> BuildOptsCLI |
-> m () |

Build.

If a buildLock is passed there is an important contract here. That lock must protect the snapshot, and it must be safe to unlock it if there are no further modifications to the snapshot to be performed by this build.

withLoadPackage :: (StackM env m, HasEnvConfig env, MonadBaseUnlift IO m) => EnvOverride -> ((PackageName -> Version -> Map FlagName Bool -> [Text] -> IO Package) -> m a) -> m a #

Provide a function for loading package information from the package index

mkBaseConfigOpts :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m) => BuildOptsCLI -> m BaseConfigOpts #

Get the `BaseConfigOpts` necessary for constructing configure options

queryBuildInfo #

Arguments

:: (StackM env m, HasEnvConfig env) |
=> [Text] | selectors
-> m () |

Query information about the build and print the result to stdout in YAML format.

splitObjsWarning :: String #

newtype CabalVersionException #

Constructors

CabalVersionException |
Fields unCabalVersionException :: String

Instances

Show CabalVersionException # |
Methods showsPrec :: Int -> CabalVersionException -> ShowS # show :: CabalVersionException -> String # showList :: [CabalVersionException] -> ShowS #
Exception CabalVersionException # |
Methods toException :: CabalVersionException -> SomeException # fromException :: SomeException -> Maybe CabalVersionException # displayException :: CabalVersionException -> String #