HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

ModuleCabal-syntax-3.18.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.

Contents
  1. Compiler flavor
  2. Per compiler flavor
  3. Compiler id
  4. Compiler info
Synopsis

Compiler flavor

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

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

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

Compiler info

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
#
Instances10Eq, Read, Show, Generic, NFData, Binary, …