Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
A module providing types and related helper functions used in module Stack.Build.ConstructPlan.
Synopsis
- data PackageInfo
- type CombinedMap = Map PackageName PackageInfo
- type M = WriterT W (StateT (Map PackageName (Either ConstructPlanException AddDepRes)) (RIO Ctx))
- data W = W {
- wFinals :: !(Map PackageName (Either ConstructPlanException Task))
- wInstall :: !(Map Text InstallLocation)
- wDirty :: !(Map PackageName Text)
- wWarnings :: !([StyleDoc] -> [StyleDoc])
- wParents :: !ParentMap
- data AddDepRes
- toTask :: AddDepRes -> Maybe Task
- adrVersion :: AddDepRes -> Version
- adrHasLibrary :: AddDepRes -> Bool
- data Ctx = Ctx {
- baseConfigOpts :: !BaseConfigOpts
- loadPackage :: !(PackageLocationImmutable -> Map FlagName Bool -> [Text] -> [Text] -> M Package)
- combinedMap :: !CombinedMap
- ctxEnvConfig :: !EnvConfig
- callStack :: ![PackageName]
- wanted :: !(Set PackageName)
- localNames :: !(Set PackageName)
- curator :: !(Maybe Curator)
- pathEnvVar :: !Text
- data UnregisterState = UnregisterState {
- toUnregister :: !(Map GhcPkgId (PackageIdentifier, Text))
- toKeep :: ![DumpPackage]
- anyAdded :: !Bool
- data ToolWarning = ToolWarning ExeName PackageName
Documentation
data PackageInfo Source #
Type representing information about packages, namely information about whether or not a package is already installed and, unless the package is not to be built (global packages), where its source code is located.
PIOnlyInstalled InstallLocation Installed | This indicates that the package is already installed, and that we shouldn't build it from source. This is only the case for global packages. |
PIOnlySource PackageSource | This indicates that the package isn't installed, and we know where to find its source. |
PIBoth PackageSource Installed | This indicates that the package is installed and we know where to find its source. We may want to reinstall from source. |
Instances
Show PackageInfo Source # | |
Defined in Stack.Types.Build.ConstructPlan showsPrec :: Int -> PackageInfo -> ShowS # show :: PackageInfo -> String # showList :: [PackageInfo] -> ShowS # |
type CombinedMap = Map PackageName PackageInfo Source #
A type synonym representing dictionaries of package names, and combined information about the package in respect of whether or not it is already installed and, unless the package is not to be built (global packages), where its source code is located.
type M = WriterT W (StateT (Map PackageName (Either ConstructPlanException AddDepRes)) (RIO Ctx)) Source #
Type synonym representing values used during the construction of a build
plan. The type is an instance of Monad
, hence its name.
Type representing values used as the output to be collected during the construction of a build plan.
W | |
|
Instances
Monoid W Source # | |
Semigroup W Source # | |
Generic W Source # | |
type Rep W Source # | |
Defined in Stack.Types.Build.ConstructPlan type Rep W = D1 ('MetaData "W" "Stack.Types.Build.ConstructPlan" "stack-2.15.3-IiMra1A9vP4fPzeIsQ44c" 'False) (C1 ('MetaCons "W" 'PrefixI 'True) ((S1 ('MetaSel ('Just "wFinals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName (Either ConstructPlanException Task))) :*: S1 ('MetaSel ('Just "wInstall") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map Text InstallLocation))) :*: (S1 ('MetaSel ('Just "wDirty") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PackageName Text)) :*: (S1 ('MetaSel ('Just "wWarnings") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ([StyleDoc] -> [StyleDoc])) :*: S1 ('MetaSel ('Just "wParents") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ParentMap))))) |
Type representing results of addDep
.
ADRToInstall Task | A task must be performed to provide the package name. |
ADRFound InstallLocation Installed | An existing installation provides the package name. |
adrVersion :: AddDepRes -> Version Source #
adrHasLibrary :: AddDepRes -> Bool Source #
Type representing values used as the environment to be read from during the construction of a build plan (the 'context').
Ctx | |
|
Instances
HasPantryConfig Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasLogFunc Ctx Source # | |
HasProcessContext Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasTerm Ctx Source # | |
HasStylesUpdate Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasBuildConfig Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasCompiler Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasConfig Ctx Source # | |
HasEnvConfig Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasSourceMap Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasGHCVariant Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasPlatform Ctx Source # | |
Defined in Stack.Types.Build.ConstructPlan | |
HasRunner Ctx Source # | |
data UnregisterState Source #
State to be maintained during the calculation of local packages to unregister.
UnregisterState | |
|
data ToolWarning Source #
Warn about tools in the snapshot definition. States the tool name expected and the package name using it.
Instances
Show ToolWarning Source # | |
Defined in Stack.Types.Build.ConstructPlan showsPrec :: Int -> ToolWarning -> ShowS # show :: ToolWarning -> String # showList :: [ToolWarning] -> ShowS # |