| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cabal.Plan
Description
Utilities for reading cabal's plan.json file
plan.json are generated when using cabal
Nix-style Local Builds.
- data PlanJson = PlanJson {
- pjCabalVersion :: !Ver
- pjCabalLibVersion :: !Ver
- pjCompilerId :: !PkgId
- pjArch :: !Text
- pjOs :: !Text
- pjUnits :: !(Map UnitId Unit)
- data Unit = Unit {}
- data CompName
- dispCompName :: CompName -> Text
- data CompInfo = CompInfo {}
- data UnitType
- newtype Ver = Ver [Int]
- dispVer :: Ver -> Text
- newtype PkgName = PkgName Text
- data PkgId = PkgId !PkgName !Ver
- dispPkgId :: PkgId -> Text
- newtype UnitId = UnitId Text
- newtype Sha256 = Sha256 ByteString
- dispSha256 :: Sha256 -> Text
- planJsonIdGraph :: PlanJson -> Map UnitId (Set UnitId)
- planJsonIdRoots :: PlanJson -> Set UnitId
- findAndDecodePlanJson :: IO (PlanJson, FilePath)
- decodePlanJson :: FilePath -> IO PlanJson
Documentation
Represents the information contained in cabal's plan.json file.
This comprises basic information describing the environment as well
as the install/build plan computed by cabal.
Constructors
| PlanJson | |
Fields
| |
Represents a build-plan unit uniquely identified by its UnitId
Constructors
| Unit | |
Fields
| |
Component name inside a build-plan unit
A similiar type exists in Cabal codebase, see
Distribution.Simple.LocalBuildInfo.ComponentName
Constructors
| CompNameLib | |
| CompNameSubLib !Text | |
| CompNameExe !Text | |
| CompNameTest !Text | |
| CompNameBench !Text | |
| CompNameSetup |
Describes kind of build unit and its provenance
Constructors
| UnitTypeBuiltin | Lives in global (non-nix-style) package db |
| UnitTypeGlobal | Lives in Nix-store cache |
| UnitTypeLocal | Local package |
| UnitTypeInplace | Local in-place package |
Basic types
Equivalent to Cabal's Distribution.Package.Version
Equivalent to Cabal's Distribution.Package.PackageName
Equivalent to Cabal's Distribution.Package.PackageIdentifier
Equivalent to Cabal's Distribution.Package.UnitId
SHA-256 hash
As an invariant, the wrapped ByteString is exactly 32 bytes long.
Constructors
| Sha256 ByteString |
Utilities
planJsonIdRoots :: PlanJson -> Set UnitId Source #
Extract UnitId root nodes from dependency graph computed by planJsonIdGraph