stack-2.14.0: The Haskell Tool Stack
Safe HaskellSafe-Inferred
LanguageGHC2021

Stack.Package

Description

Dealing with Cabal.

Synopsis

Documentation

readDotBuildinfo :: MonadIO m => Path Abs File -> m HookedBuildInfo Source #

Read package.buildinfo ancillary files produced by some Setup.hs hooks. The file includes Cabal file syntax to be merged into the package description derived from the package's Cabal file.

NOTE: not to be confused with BuildInfo, an Stack-internal datatype.

resolvePackage :: PackageConfig -> GenericPackageDescription -> Package Source #

Resolve a parsed Cabal file into a Package, which contains all of the info needed for Stack to build the Package given the current configuration.

data Package Source #

Some package info.

Constructors

Package 

Fields

Instances

Instances details
Show Package Source # 
Instance details

Defined in Stack.Types.Package

Eq Package Source #

Compares the package name.

Instance details

Defined in Stack.Types.Package

Methods

(==) :: Package -> Package -> Bool #

(/=) :: Package -> Package -> Bool #

Ord Package Source #

Compares the package name.

Instance details

Defined in Stack.Types.Package

data PackageDescriptionPair Source #

A pair of package descriptions: one which modified the buildable values of test suites and benchmarks depending on whether they are enabled, and one which does not.

Fields are intentionally lazy, we may only need one or the other value.

Michael S Snoyman 2017-08-29: The very presence of this data type is terribly ugly, it represents the fact that the Cabal 2.0 upgrade did _not_ go well. Specifically, we used to have a field to indicate whether a component was enabled in addition to buildable, but that's gone now, and this is an ugly proxy. We should at some point clean up the mess of Package, LocalPackage, etc, and probably pull in the definition of PackageDescription from Cabal with our additionally needed metadata. But this is a good enough hack for the moment. Odds are, you're reading this in the year 2024 and thinking "wtf?"

newtype GetPackageOpts Source #

Files that the package depends on, relative to package directory. Argument is the location of the Cabal file

Instances

Instances details
Show GetPackageOpts Source # 
Instance details

Defined in Stack.Types.Package

data PackageConfig Source #

Package build configuration

Constructors

PackageConfig 

Fields

Instances

Instances details
Show PackageConfig Source # 
Instance details

Defined in Stack.Types.Package

buildLogPath :: (MonadReader env m, HasBuildConfig env, MonadThrow m) => Package -> Maybe String -> m (Path Abs File) Source #

Path for the package's build log.

packageDependencies :: PackageDescription -> Map PackageName VersionRange Source #

Get all dependencies of the package (buildable targets only).

applyForceCustomBuild Source #

Arguments

:: Version

global Cabal version

-> Package 
-> Package 

Force a package to be treated as a custom build type, see https://github.com/commercialhaskell/stack/issues/4488