stack-1.6.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Snapshot

Description

Reading in SnapshotDefs and converting them into LoadedSnapshots.

Synopsis

Documentation

loadResolver :: forall env. HasConfig env => Resolver -> RIO env SnapshotDef Source #

Convert a Resolver into a SnapshotDef

loadSnapshot Source #

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.