License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | GHC2021 |
Stack.SourceMap
Description
Synopsis
- mkProjectPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => PrintWarnings -> ResolvedPath Dir -> Bool -> RIO env ProjectPackage
- snapToDepPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> PackageName -> SnapshotPackage -> RIO env DepPackage
- additionalDepPackage :: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) => Bool -> PackageLocation -> RIO env DepPackage
- loadVersion :: MonadIO m => CommonPackage -> m Version
- getPLIVersion :: PackageLocationImmutable -> Version
- loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version))
- actualFromGhc :: (HasConfig env, HasCompiler env) => SMWanted -> ActualCompiler -> RIO env (SMActual DumpedGlobalPackage)
- globalCondCheck :: HasConfig env => RIO env (ConfVar -> Either ConfVar Bool)
- pruneGlobals :: Map PackageName DumpedGlobalPackage -> Set PackageName -> Map PackageName GlobalPackage
- globalsFromHints :: HasConfig env => WantedCompiler -> RIO env (Map PackageName Version)
- getCompilerInfo :: (HasConfig env, HasCompiler env) => RIO env Builder
- immutableLocSha :: PackageLocationImmutable -> Builder
- loadProjectSnapshotCandidate :: HasConfig env => RawSnapshotLocation -> PrintWarnings -> Bool -> RIO env (SnapshotCandidate env)
- type SnapshotCandidate env = [ResolvedPath Dir] -> RIO env (SMActual GlobalPackageVersion)
- globalsFromDump :: (HasProcessContext env, HasTerm env) => GhcPkgExe -> RIO env (Map PackageName DumpedGlobalPackage)
Documentation
Arguments
:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
=> PrintWarnings | |
-> ResolvedPath Dir | |
-> Bool | Should Haddock documentation be built for the package? |
-> RIO env ProjectPackage |
Create a ProjectPackage
from a directory containing a package.
Arguments
:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
=> Bool | Should Haddock documentation be built for the package? |
-> PackageName | |
-> SnapshotPackage | |
-> RIO env DepPackage |
Given a PackageName
and its SnapshotPackage
, yields the corresponding
DepPackage
.
Arguments
:: (HasPantryConfig env, HasLogFunc env, HasProcessContext env) | |
=> Bool | Should Haddock documentation be built for the package? |
-> PackageLocation | |
-> RIO env DepPackage |
Create a DepPackage
from a PackageLocation
, from some additional to a
snapshot setting (extra-deps or command line).
loadVersion :: MonadIO m => CommonPackage -> m Version Source #
For the given CommonPackage
, load its generic package description and
yield its version.
getPLIVersion :: PackageLocationImmutable -> Version Source #
For the given PackageLocationImmutable
, yield the version of the
referenced package.
loadGlobalHints :: (HasTerm env, HasPantryConfig env) => WantedCompiler -> RIO env (Maybe (Map PackageName Version)) Source #
Load the global hints.
Since: pantry-9.4.0
actualFromGhc :: (HasConfig env, HasCompiler env) => SMWanted -> ActualCompiler -> RIO env (SMActual DumpedGlobalPackage) Source #
When the environment HasCompiler
, for the
given SMWanted
and ActualCompiler
, yield
a SMActual
parameterised by DumpedGlobalPackage
.
globalCondCheck :: HasConfig env => RIO env (ConfVar -> Either ConfVar Bool) Source #
Simple cond check for boot packages - checks only OS and Arch
Arguments
:: Map PackageName DumpedGlobalPackage | Packages in GHC's global package database. |
-> Set PackageName | Package names to prune. |
-> Map PackageName GlobalPackage |
Prune the given packages from GHC's global package database.
globalsFromHints :: HasConfig env => WantedCompiler -> RIO env (Map PackageName Version) Source #
For the given wanted compiler, yield the global hints (if available).
getCompilerInfo :: (HasConfig env, HasCompiler env) => RIO env Builder Source #
Get the output of ghc --info
for the compiler in the environment.
immutableLocSha :: PackageLocationImmutable -> Builder Source #
For the given PackageLocationImmutable
, yield its 256-bit cryptographic
hash.
loadProjectSnapshotCandidate Source #
Arguments
:: HasConfig env | |
=> RawSnapshotLocation | |
-> PrintWarnings | |
-> Bool | Should Haddock documentation be build for the package? |
-> RIO env (SnapshotCandidate env) |
For the given raw snapshot location, yield a function to yield a
SMActual
from a list of project package directories.
type SnapshotCandidate env = [ResolvedPath Dir] -> RIO env (SMActual GlobalPackageVersion) Source #
Type synonym for functions that yield a SMActual
parameterised by
GlobalPackageVersion
for a given list of project package directories.
globalsFromDump :: (HasProcessContext env, HasTerm env) => GhcPkgExe -> RIO env (Map PackageName DumpedGlobalPackage) Source #
For the given ghc-pkg
executable, yield the contents of the global
package database.