HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecabal-install-3.12.1.0Haskell2010

Distribution.Client.ProjectConfig.Legacy

Project configuration, implementation in terms of legacy types.

  • 2 types
  • 13 values

Project config in terms of legacy types

3 declarations
datadata LegacyProjectConfig
#

We already have parsers/pretty-printers for almost all the fields in the project config file, but they're in terms of the types used for the command line flags for Setup.hs or cabal commands. We don't want to redefine them all, at least not yet so for the moment we use the parsers at the old types and use conversion functions.

Ultimately if/when this project-based approach becomes the default then we can redefine the parsers directly for the new types.

Instances5Show, Generic, Semigroup, Monoid, Rep

Conversion to and from legacy config types

4 declarations

Convert from the types currently used for the user-wide Cabal config file into the ProjectConfig type.

Only a subset of the ProjectConfig can be represented in the user-wide config. In particular it does not include packages that are in the project, and it also doesn't support package-specific configuration (only configuration that applies to all packages).

Internals, just for tests

2 declarations

This is a bit tricky since it has to cover globs which have embedded , chars. But we don't just want to parse strictly as a glob since we want to allow http urls which don't parse as globs, and possibly some system-dependent file paths. So we parse fairly liberally as a token, but we allow , inside matched {} braces.