| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Stack.Snapshot
Description
Reading in SnapshotDefs and converting them into
LoadedSnapshots.
- loadResolver :: forall env. HasConfig env => Resolver -> RIO env SnapshotDef
- loadSnapshot :: forall env. (HasConfig env, HasGHCVariant env) => Maybe (CompilerVersion CVActual) -> Path Abs Dir -> SnapshotDef -> RIO env LoadedSnapshot
- calculatePackagePromotion :: forall env localLocation. (HasConfig env, HasGHCVariant env) => (PackageIdentifierRevision -> IO ByteString) -> Path Abs Dir -> LoadedSnapshot -> [(GenericPackageDescription, SinglePackageLocation, localLocation)] -> Map PackageName (Map FlagName Bool) -> Map PackageName Bool -> Map PackageName [Text] -> Set PackageName -> RIO env (Map PackageName (LoadedPackageInfo GhcPkgId), Map PackageName (LoadedPackageInfo SinglePackageLocation), Map PackageName (LoadedPackageInfo (SinglePackageLocation, Maybe localLocation)))
Documentation
loadResolver :: forall env. HasConfig env => Resolver -> RIO env SnapshotDef Source #
Convert a Resolver into a SnapshotDef
Arguments
| :: (HasConfig env, HasGHCVariant env) | |
| => Maybe (CompilerVersion CVActual) | installed GHC we should query; if none provided, use the global hints |
| -> Path Abs Dir | project root, used for checking out necessary files |
| -> SnapshotDef | |
| -> RIO env LoadedSnapshot |
Fully load up a SnapshotDef into a LoadedSnapshot
calculatePackagePromotion Source #
Arguments
| :: (HasConfig env, HasGHCVariant env) | |
| => (PackageIdentifierRevision -> IO ByteString) | load from index |
| -> Path Abs Dir | project root |
| -> LoadedSnapshot | |
| -> [(GenericPackageDescription, SinglePackageLocation, localLocation)] | packages we want to add on top of this snapshot |
| -> Map PackageName (Map FlagName Bool) | flags |
| -> Map PackageName Bool | overrides whether a package should be registered hidden |
| -> Map PackageName [Text] | GHC options |
| -> Set PackageName | packages in the snapshot to drop |
| -> RIO env (Map PackageName (LoadedPackageInfo GhcPkgId), Map PackageName (LoadedPackageInfo SinglePackageLocation), Map PackageName (LoadedPackageInfo (SinglePackageLocation, Maybe localLocation))) |
Given information on a LoadedSnapshot and a given set of
additional packages and configuration values, calculates the new
global and snapshot packages, as well as the new local packages.
The new globals and snapshots must be a subset of the initial values.