Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stack.Types.BuildPlan
Contents
Description
Shared types for various stackage packages.
Synopsis
- data SnapshotDef = SnapshotDef {
- sdParent :: !(Either (CompilerVersion CVWanted) SnapshotDef)
- sdResolver :: !LoadedResolver
- sdResolverName :: !Text
- sdLocations :: ![PackageLocationIndex Subdirs]
- sdDropPackages :: !(Set PackageName)
- sdFlags :: !(Map PackageName (Map FlagName Bool))
- sdHidden :: !(Map PackageName Bool)
- sdGhcOptions :: !(Map PackageName [Text])
- sdGlobalHints :: !(Map PackageName (Maybe Version))
- snapshotDefVC :: VersionConfig SnapshotDef
- sdRawPathName :: SnapshotDef -> String
- data PackageLocation subdirs
- data PackageLocationIndex subdirs
- = PLIndex !PackageIdentifierRevision
- | PLOther !(PackageLocation subdirs)
- data RepoType
- data Subdirs
- data Repo subdirs = Repo {
- repoUrl :: !Text
- repoCommit :: !Text
- repoType :: !RepoType
- repoSubdirs :: !subdirs
- data Archive subdirs = Archive {
- archiveUrl :: !Text
- archiveSubdirs :: !subdirs
- archiveHash :: !(Maybe StaticSHA256)
- newtype ExeName = ExeName {}
- data LoadedSnapshot = LoadedSnapshot {}
- loadedSnapshotVC :: VersionConfig LoadedSnapshot
- data LoadedPackageInfo loc = LoadedPackageInfo {
- lpiVersion :: !Version
- lpiLocation :: !loc
- lpiFlags :: !(Map FlagName Bool)
- lpiGhcOptions :: ![Text]
- lpiPackageDeps :: !(Map PackageName VersionIntervals)
- lpiProvidedExes :: !(Set ExeName)
- lpiNeededExes :: !(Map ExeName VersionIntervals)
- lpiExposedModules :: !(Set ModuleName)
- lpiHide :: !Bool
- newtype ModuleName = ModuleName {}
- fromCabalModuleName :: ModuleName -> ModuleName
- newtype ModuleInfo = ModuleInfo {
- miModules :: Map ModuleName (Set PackageName)
- moduleInfoVC :: VersionConfig ModuleInfo
- setCompilerVersion :: CompilerVersion CVWanted -> SnapshotDef -> SnapshotDef
- sdWantedCompilerVersion :: SnapshotDef -> CompilerVersion CVWanted
Types
data SnapshotDef #
A definition of a snapshot. This could be a Stackage snapshot or something custom. It does not include information on the global package database, this is added later.
It may seem more logic to attach flags, options, etc, directly with the desired package. However, this isn't possible yet: our definition may contain tarballs or Git repos, and we don't actually know the package names contained there. Therefore, we capture all of this additional information by package name, and later in the snapshot load step we will resolve the contents of tarballs and repos, figure out package names, and assigned values appropriately.
Constructors
SnapshotDef | |
Fields
|
Instances
sdRawPathName :: SnapshotDef -> String #
A relative file path including a unique string for the given snapshot.
data PackageLocation subdirs #
Where to get the contents of a package (including cabal file revisions) from.
A GADT may be more logical than the index parameter, but this plays more nicely with Generic deriving.
Constructors
PLFilePath !FilePath | Note that we use |
PLArchive !(Archive subdirs) | |
PLRepo !(Repo subdirs) | Stored in a source control repository |
Instances
data PackageLocationIndex subdirs #
Add in the possibility of getting packages from the index
(including cabal file revisions). We have special handling of this
case in many places in the codebase, and therefore represent it
with a separate data type from PackageLocation
.
Constructors
PLIndex !PackageIdentifierRevision | Grab the package from the package index with the given version and (optional) cabal file info to specify the correct revision. |
PLOther !(PackageLocation subdirs) |
Instances
The type of a source control repository.
Instances
Eq RepoType # | |
Data RepoType # | |
Defined in Stack.Types.BuildPlan Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RepoType -> c RepoType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RepoType # toConstr :: RepoType -> Constr # dataTypeOf :: RepoType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RepoType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RepoType) # gmapT :: (forall b. Data b => b -> b) -> RepoType -> RepoType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RepoType -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RepoType -> r # gmapQ :: (forall d. Data d => d -> u) -> RepoType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> RepoType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType # | |
Ord RepoType # | |
Defined in Stack.Types.BuildPlan | |
Show RepoType # | |
Generic RepoType # | |
NFData RepoType # | |
Defined in Stack.Types.BuildPlan | |
Store RepoType # | |
type Rep RepoType # | |
Constructors
DefaultSubdirs | |
ExplicitSubdirs ![FilePath] |
Instances
Eq Subdirs # | |
Data Subdirs # | |
Defined in Stack.Types.BuildPlan Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Subdirs -> c Subdirs # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Subdirs # toConstr :: Subdirs -> Constr # dataTypeOf :: Subdirs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Subdirs) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Subdirs) # gmapT :: (forall b. Data b => b -> b) -> Subdirs -> Subdirs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Subdirs -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Subdirs -> r # gmapQ :: (forall d. Data d => d -> u) -> Subdirs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Subdirs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Subdirs -> m Subdirs # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Subdirs -> m Subdirs # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Subdirs -> m Subdirs # | |
Show Subdirs # | |
Generic Subdirs # | |
NFData Subdirs # | |
Defined in Stack.Types.BuildPlan | |
FromJSON Subdirs # | |
Store Subdirs # | |
type Rep Subdirs # | |
Defined in Stack.Types.BuildPlan type Rep Subdirs = D1 (MetaData "Subdirs" "Stack.Types.BuildPlan" "stack-1.7.1-79VQHXRBDVUIQMpSmzqhhb" False) (C1 (MetaCons "DefaultSubdirs" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "ExplicitSubdirs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [FilePath]))) |
Information on packages stored in a source control repository.
Constructors
Repo | |
Fields
|
Instances
Functor Repo # | |
Eq subdirs => Eq (Repo subdirs) # | |
Data subdirs => Data (Repo subdirs) # | |
Defined in Stack.Types.BuildPlan Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Repo subdirs -> c (Repo subdirs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Repo subdirs) # toConstr :: Repo subdirs -> Constr # dataTypeOf :: Repo subdirs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Repo subdirs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Repo subdirs)) # gmapT :: (forall b. Data b => b -> b) -> Repo subdirs -> Repo subdirs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Repo subdirs -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Repo subdirs -> r # gmapQ :: (forall d. Data d => d -> u) -> Repo subdirs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Repo subdirs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Repo subdirs -> m (Repo subdirs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Repo subdirs -> m (Repo subdirs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Repo subdirs -> m (Repo subdirs) # | |
Ord subdirs => Ord (Repo subdirs) # | |
Defined in Stack.Types.BuildPlan | |
Show subdirs => Show (Repo subdirs) # | |
Generic (Repo subdirs) # | |
NFData a => NFData (Repo a) # | |
Defined in Stack.Types.BuildPlan | |
Store a => Store (Repo a) # | |
type Rep (Repo subdirs) # | |
Defined in Stack.Types.BuildPlan type Rep (Repo subdirs) = D1 (MetaData "Repo" "Stack.Types.BuildPlan" "stack-1.7.1-79VQHXRBDVUIQMpSmzqhhb" False) (C1 (MetaCons "Repo" PrefixI True) ((S1 (MetaSel (Just "repoUrl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "repoCommit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "repoType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 RepoType) :*: S1 (MetaSel (Just "repoSubdirs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 subdirs)))) |
A package archive, could be from a URL or a local file path. Local file path archives are assumed to be unchanging over time, and so are allowed in custom snapshots.
Constructors
Archive | |
Fields
|
Instances
Functor Archive # | |
Eq subdirs => Eq (Archive subdirs) # | |
Data subdirs => Data (Archive subdirs) # | |
Defined in Stack.Types.BuildPlan Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Archive subdirs -> c (Archive subdirs) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Archive subdirs) # toConstr :: Archive subdirs -> Constr # dataTypeOf :: Archive subdirs -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Archive subdirs)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Archive subdirs)) # gmapT :: (forall b. Data b => b -> b) -> Archive subdirs -> Archive subdirs # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Archive subdirs -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Archive subdirs -> r # gmapQ :: (forall d. Data d => d -> u) -> Archive subdirs -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Archive subdirs -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Archive subdirs -> m (Archive subdirs) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Archive subdirs -> m (Archive subdirs) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Archive subdirs -> m (Archive subdirs) # | |
Ord subdirs => Ord (Archive subdirs) # | |
Defined in Stack.Types.BuildPlan Methods compare :: Archive subdirs -> Archive subdirs -> Ordering # (<) :: Archive subdirs -> Archive subdirs -> Bool # (<=) :: Archive subdirs -> Archive subdirs -> Bool # (>) :: Archive subdirs -> Archive subdirs -> Bool # (>=) :: Archive subdirs -> Archive subdirs -> Bool # max :: Archive subdirs -> Archive subdirs -> Archive subdirs # min :: Archive subdirs -> Archive subdirs -> Archive subdirs # | |
Show subdirs => Show (Archive subdirs) # | |
Generic (Archive subdirs) # | |
NFData a => NFData (Archive a) # | |
Defined in Stack.Types.BuildPlan | |
Store a => Store (Archive a) # | |
type Rep (Archive subdirs) # | |
Defined in Stack.Types.BuildPlan type Rep (Archive subdirs) = D1 (MetaData "Archive" "Stack.Types.BuildPlan" "stack-1.7.1-79VQHXRBDVUIQMpSmzqhhb" False) (C1 (MetaCons "Archive" PrefixI True) (S1 (MetaSel (Just "archiveUrl") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "archiveSubdirs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 subdirs) :*: S1 (MetaSel (Just "archiveHash") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe StaticSHA256))))) |
Name of an executable.
Instances
Eq ExeName # | |
Data ExeName # | |
Defined in Stack.Types.BuildPlan Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ExeName -> c ExeName # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ExeName # toConstr :: ExeName -> Constr # dataTypeOf :: ExeName -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ExeName) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ExeName) # gmapT :: (forall b. Data b => b -> b) -> ExeName -> ExeName # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ExeName -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ExeName -> r # gmapQ :: (forall d. Data d => d -> u) -> ExeName -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ExeName -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ExeName -> m ExeName # | |
Ord ExeName # | |
Defined in Stack.Types.BuildPlan | |
Show ExeName # | |
IsString ExeName # | |
Defined in Stack.Types.BuildPlan Methods fromString :: String -> ExeName # | |
Generic ExeName # | |
NFData ExeName # | |
Defined in Stack.Types.BuildPlan | |
Hashable ExeName # | |
Defined in Stack.Types.BuildPlan | |
Store ExeName # | |
type Rep ExeName # | |
Defined in Stack.Types.BuildPlan |
data LoadedSnapshot #
A fully loaded snapshot combined , including information gleaned from the global database and parsing cabal files.
Invariant: a global package may not depend upon a snapshot package, a snapshot may not depend upon a local or project, and all dependencies must be satisfied.
Constructors
LoadedSnapshot | |
Fields |
Instances
data LoadedPackageInfo loc #
Information on a single package for the LoadedSnapshot
which
can be installed.
Note that much of the information below (such as the package dependencies or exposed modules) can be conditional in the cabal file, which means it will vary based on flags, arch, and OS.
Constructors
LoadedPackageInfo | |
Fields
|
Instances
newtype ModuleName #
Constructors
ModuleName | |
Fields |
Instances
newtype ModuleInfo #
Constructors
ModuleInfo | |
Fields
|
Instances
setCompilerVersion :: CompilerVersion CVWanted -> SnapshotDef -> SnapshotDef #
Modify the wanted compiler version in this snapshot. This is used
when overriding via the compiler
value in a custom snapshot or
stack.yaml file. We do _not_ need to modify the snapshot's hash for
this: all binary caches of a snapshot are stored in a filepath that
encodes the actual compiler version in addition to the
hash. Therefore, modifications here will not lead to any invalid
data.
sdWantedCompilerVersion :: SnapshotDef -> CompilerVersion CVWanted #
Determined the desired compiler version for this SnapshotDef
.