stack-1.5.1: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Build.Source

Synopsis

Documentation

loadSourceMap :: (StackM env m, HasEnvConfig env) => NeedTargets -> BuildOptsCLI -> m ([LocalPackage], SourceMap) Source #

Like loadSourceMapFull, but doesn't return values that aren't as commonly needed.

loadSourceMapFull :: (StackM env m, HasEnvConfig env) => NeedTargets -> BuildOptsCLI -> m (Map PackageName SimpleTarget, MiniBuildPlan, [LocalPackage], Set PackageName, Map PackageName Version, SourceMap) Source #

Given the build commandline options, does the following:

  • Parses the build targets.
  • Loads the MiniBuildPlan from the resolver, with extra-deps shadowing any packages that should be built locally.
  • Loads up the LocalPackage info.
  • Builds a SourceMap, which contains info for all the packages that will be involved in the build.

data PackageSource Source #

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

Constructors

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.

getLocalFlags :: BuildConfig -> BuildOptsCLI -> PackageName -> Map FlagName Bool Source #

All flags for a local package.

getGhcOptions :: BuildConfig -> BuildOptsCLI -> PackageName -> Bool -> Bool -> [Text] Source #

Get the configured options to pass from GHC, based on the build configuration and commandline.

getLocalPackageViews :: (StackM env m, HasEnvConfig env) => m (Map PackageName (LocalPackageView, GenericPackageDescription)) Source #

Parse out the local package views for the current project

parseTargetsFromBuildOpts :: (StackM env m, HasEnvConfig env) => NeedTargets -> BuildOptsCLI -> m (MiniBuildPlan, Map PackageName Version, Map PackageName SimpleTarget) Source #

Use the build options and environment to parse targets.

If the local packages views are already known, use parseTargetsFromBuildOptsWith instead.

Along with the Map of targets, this yields the loaded MiniBuildPlan for the resolver, as well as a Map of extra-deps derived from the commandline. These extra-deps targets come from when the user specifies a particular package version on the commonadline, or when a flag is specified for a snapshot package.

addUnlistedToBuildCache :: (StackM env m, HasEnvConfig env) => ModTime -> Package -> Path Abs File -> Map FilePath a -> m ([Map FilePath FileCacheInfo], [PackageWarning]) Source #

Returns entries to add to the build cache for any newly found unlisted modules

getPackageConfig :: (MonadIO m, MonadReader env m, HasEnvConfig env) => BuildOptsCLI -> PackageName -> Bool -> Bool -> m PackageConfig Source #

Get PackageConfig for package given its name.