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-syntax-3.12.1.0Haskell2010

Distribution.Compiler

This has an enumeration of the various compilers that Cabal knows about. It also specifies the default compiler. Sadly you'll often see code that does case analysis on this compiler flavour enumeration like:

case compilerFlavor comp of
  GHC -> GHC.getInstalledPackages verbosity packageDb progdb

Obviously it would be better to use the proper Compiler abstraction because that would keep all the compiler-specific code together. Unfortunately we cannot make this change yet without breaking the UserHooks api, which would break all custom Setup.hs files, so for the moment we just have to live with this deficiency. If you're interested, see ticket #57.

  • 5 types
  • 8 values

Compiler flavor

6 declarations
datadata CompilerFlavor
#
Instances13Eq, Data, Ord, Read, Show, Generic, …

The default compiler flavour to pick when compiling stuff. This defaults to the compiler used to build the Cabal lib.

However if it's not a recognised compiler then it's Nothing and the user will have to specify which compiler they want.

Per compiler flavor

2 declarations
datadata PerCompilerFlavor v
#

PerCompilerFlavor carries only info per GHC and GHCJS

Cabal parses only ghc-options and ghcjs-options, others are omitted.

Constructors

Instances15Functor, Foldable, Traversable, Eq, Data, Ord, …

Compiler id

1 declaration
datadata CompilerId
#
Instances11Eq, Ord, Read, Show, Generic, NFData, …

Compiler info

4 declarations
datadata CompilerInfo
#

Compiler information used for resolving configurations. Some fields can be set to Nothing to indicate that the information is unknown.

Constructors

Instances5Read, Show, Generic, Binary, Rep
datadata AbiTag
#
Instances9Eq, Read, Show, Generic, Binary, Parsec, …