HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Modulecabal-install-3.18.1.0Haskell2010

Distribution.Client.ProjectConfig.Parsec

Parsing project configuration.

  • 2 types
  • 2 values

Package configuration

2 declarations
datadata ProjectConfig
#

This type corresponds directly to what can be written in the cabal.project file. Other sources of configuration can also be injected into this type, such as the user-wide config file and the command line of cabal configure or cabal build.

Since it corresponds to the external project file it is an instance of Monoid and all the fields can be empty. This also means there has to be a step where we resolve configuration. At a minimum resolving means applying defaults but it can also mean merging information from multiple sources. For example for package-specific configuration the project file can specify configuration that applies to all local packages, and then additional configuration for a specific package.

Future directions: multiple profiles, conditionals. If we add these features then the gap between configuration as written in the config file and resolved settings we actually use will become even bigger.

Constructors

Instances9Eq, Show, Generic, Semigroup, Monoid, NFData, …

Parsing

newtypenewtype ParseResult src a
#

A monad with failure and accumulating errors and warnings.

Instances3Monad, Functor, Applicative