Safe Haskell | None |
---|---|
Language | Haskell2010 |
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)
- 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 Source #
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.
SnapshotDef | |
|
Instances
sdRawPathName :: SnapshotDef -> String Source #
A relative file path including a unique string for the given snapshot.
data PackageLocation subdirs Source #
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.
PLFilePath !FilePath | Note that we use |
PLArchive !(Archive subdirs) | |
PLRepo !(Repo subdirs) | Stored in a source control repository |
Instances
data PackageLocationIndex subdirs Source #
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
.
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 Source # | |
Data RepoType Source # | |
Defined in Stack.Types.BuildPlan 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 Source # | |
Defined in Stack.Types.BuildPlan | |
Show RepoType Source # | |
Generic RepoType Source # | |
NFData RepoType Source # | |
Defined in Stack.Types.BuildPlan | |
Store RepoType Source # | |
type Rep RepoType Source # | |
Instances
Eq Subdirs Source # | |
Data Subdirs Source # | |
Defined in Stack.Types.BuildPlan 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 Source # | |
Generic Subdirs Source # | |
NFData Subdirs Source # | |
Defined in Stack.Types.BuildPlan | |
FromJSON Subdirs Source # | |
Store Subdirs Source # | |
type Rep Subdirs Source # | |
Defined in Stack.Types.BuildPlan type Rep Subdirs = D1 (MetaData "Subdirs" "Stack.Types.BuildPlan" "stack-1.9.1.1-6jz2L6XfBym9jbCxt3ojTR" False) (C1 (MetaCons "DefaultSubdirs" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ExplicitSubdirs" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [FilePath]))) |
Information on packages stored in a source control repository.
Repo | |
|
Instances
Functor Repo Source # | |
Eq subdirs => Eq (Repo subdirs) Source # | |
Data subdirs => Data (Repo subdirs) Source # | |
Defined in Stack.Types.BuildPlan 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) Source # | |
Defined in Stack.Types.BuildPlan | |
Show subdirs => Show (Repo subdirs) Source # | |
Generic (Repo subdirs) Source # | |
NFData a => NFData (Repo a) Source # | |
Defined in Stack.Types.BuildPlan | |
Store a => Store (Repo a) Source # | |
type Rep (Repo subdirs) Source # | |
Defined in Stack.Types.BuildPlan type Rep (Repo subdirs) = D1 (MetaData "Repo" "Stack.Types.BuildPlan" "stack-1.9.1.1-6jz2L6XfBym9jbCxt3ojTR" 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.
Archive | |
|
Instances
Functor Archive Source # | |
Eq subdirs => Eq (Archive subdirs) Source # | |
Data subdirs => Data (Archive subdirs) Source # | |
Defined in Stack.Types.BuildPlan 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) Source # | |
Defined in Stack.Types.BuildPlan 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) Source # | |
Generic (Archive subdirs) Source # | |
NFData a => NFData (Archive a) Source # | |
Defined in Stack.Types.BuildPlan | |
Store a => Store (Archive a) Source # | |
type Rep (Archive subdirs) Source # | |
Defined in Stack.Types.BuildPlan type Rep (Archive subdirs) = D1 (MetaData "Archive" "Stack.Types.BuildPlan" "stack-1.9.1.1-6jz2L6XfBym9jbCxt3ojTR" 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 Source # | |
Data ExeName Source # | |
Defined in Stack.Types.BuildPlan 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 Source # | |
Show ExeName Source # | |
IsString ExeName Source # | |
Defined in Stack.Types.BuildPlan fromString :: String -> ExeName # | |
Generic ExeName Source # | |
NFData ExeName Source # | |
Defined in Stack.Types.BuildPlan | |
Hashable ExeName Source # | |
Defined in Stack.Types.BuildPlan | |
Store ExeName Source # | |
type Rep ExeName Source # | |
Defined in Stack.Types.BuildPlan |
data LoadedSnapshot Source #
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.
Instances
data LoadedPackageInfo loc Source #
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.
LoadedPackageInfo | |
|
Instances
newtype ModuleName Source #
Instances
newtype ModuleInfo Source #
Instances
setCompilerVersion :: CompilerVersion CVWanted -> SnapshotDef -> SnapshotDef Source #
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 Source #
Determined the desired compiler version for this SnapshotDef
.