stack-1.4.0: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Build.Source

Synopsis

- loadSourceMap :: (StackM env m, HasEnvConfig env) => NeedTargets -> BuildOptsCLI -> m ([LocalPackage], SourceMap)
- loadSourceMapFull :: (StackM env m, HasEnvConfig env) => Bool -> NeedTargets -> BuildOptsCLI -> m (Map PackageName SimpleTarget, MiniBuildPlan, [LocalPackage], Set PackageName, Map PackageName Version, SourceMap)
- type SourceMap = Map PackageName PackageSource
- data PackageSource
  - = PSLocal LocalPackage
  - | PSUpstream Version InstallLocation (Map FlagName Bool) [Text] (Maybe GitSHA1)
- getLocalFlags :: BuildConfig -> BuildOptsCLI -> PackageName -> Map FlagName Bool
- getGhcOptions :: BuildConfig -> BuildOptsCLI -> PackageName -> Bool -> Bool -> [Text]
- getLocalPackageViews :: (StackM env m, HasEnvConfig env) => m (Map PackageName (LocalPackageView, GenericPackageDescription))
- parseTargetsFromBuildOpts :: (StackM env m, HasEnvConfig env) => NeedTargets -> BuildOptsCLI -> m (MiniBuildPlan, Map PackageName Version, Map PackageName SimpleTarget)
- parseTargetsFromBuildOptsWith :: (StackM env m, HasEnvConfig env) => Map PackageName (LocalPackageView, GenericPackageDescription) -> NeedTargets -> BuildOptsCLI -> m (MiniBuildPlan, Map PackageName Version, Map PackageName SimpleTarget)
- addUnlistedToBuildCache :: (StackM env m, HasEnvConfig env) => ModTime -> Package -> Path Abs File -> Map FilePath a -> m ([Map FilePath FileCacheInfo], [PackageWarning])
- getDefaultPackageConfig :: (MonadIO m, MonadReader env m, HasEnvConfig env) => m PackageConfig
- getPackageConfig :: (MonadIO m, MonadReader env m, HasEnvConfig env) => BuildOptsCLI -> PackageName -> Bool -> Bool -> m PackageConfig

# Documentation

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

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

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

type SourceMap = Map PackageName PackageSource #

data PackageSource #

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.

Instances

Show PackageSource # |
Methods showsPrec :: Int -> PackageSource -> ShowS # show :: PackageSource -> String # showList :: [PackageSource] -> ShowS #
PackageInstallInfo PackageSource # |
Methods piiVersion :: PackageSource -> Version # piiLocation :: PackageSource -> InstallLocation #

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

All flags for a local package

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

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

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) #

Use the build options and environment to parse targets.

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

parseTargetsFromBuildOptsWith #

Arguments

:: (StackM env m, HasEnvConfig env) |
=> Map PackageName (LocalPackageView, GenericPackageDescription) | Local package views
-> NeedTargets |
-> BuildOptsCLI |
-> m (MiniBuildPlan, Map PackageName Version, Map PackageName SimpleTarget) |

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

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

getDefaultPackageConfig :: (MonadIO m, MonadReader env m, HasEnvConfig env) => m PackageConfig #

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

Get `PackageConfig` for package given its name.