Cabal-3.2.1.0: A framework for packaging Haskell software
Copyright Isaac Jones 2003-2004
License BSD3
Maintainer cabal-devel@haskell.org
Portability portable
Safe Haskell None
Language Haskell2010

Distribution.Compiler

Description

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.

Synopsis

Compiler flavor

data CompilerFlavor Source #

Instances

Instances details
Eq CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Data CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> CompilerFlavor -> c CompilerFlavor Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c CompilerFlavor Source #

toConstr :: CompilerFlavor -> Constr Source #

dataTypeOf :: CompilerFlavor -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c CompilerFlavor ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c CompilerFlavor ) Source #

gmapT :: ( forall b. Data b => b -> b) -> CompilerFlavor -> CompilerFlavor Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> CompilerFlavor -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> CompilerFlavor -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> CompilerFlavor -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> CompilerFlavor -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> CompilerFlavor -> m CompilerFlavor Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> CompilerFlavor -> m CompilerFlavor Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> CompilerFlavor -> m CompilerFlavor Source #

Ord CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Read CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Show CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Generic CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Binary CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

NFData CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Structured CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Pretty CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Parsec CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

Newtype ( CompilerFlavor , VersionRange ) TestedWith Source #
Instance details

Defined in Distribution.Parsec.Newtypes

type Rep CompilerFlavor Source #
Instance details

Defined in Distribution.Compiler

defaultCompilerFlavor :: Maybe CompilerFlavor Source #

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

data PerCompilerFlavor v Source #

PerCompilerFlavor carries only info per GHC and GHCJS

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

Constructors

PerCompilerFlavor v v

Instances

Instances details
Eq v => Eq ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Data v => Data ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> PerCompilerFlavor v -> c ( PerCompilerFlavor v) Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( PerCompilerFlavor v) Source #

toConstr :: PerCompilerFlavor v -> Constr Source #

dataTypeOf :: PerCompilerFlavor v -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( PerCompilerFlavor v)) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( PerCompilerFlavor v)) Source #

gmapT :: ( forall b. Data b => b -> b) -> PerCompilerFlavor v -> PerCompilerFlavor v Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> PerCompilerFlavor v -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> PerCompilerFlavor v -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> PerCompilerFlavor v -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> PerCompilerFlavor v -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> PerCompilerFlavor v -> m ( PerCompilerFlavor v) Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> PerCompilerFlavor v -> m ( PerCompilerFlavor v) Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> PerCompilerFlavor v -> m ( PerCompilerFlavor v) Source #

Read v => Read ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Show v => Show ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Generic ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Semigroup a => Semigroup ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

( Semigroup a, Monoid a) => Monoid ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

Binary a => Binary ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

NFData a => NFData ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

Structured a => Structured ( PerCompilerFlavor a) Source #
Instance details

Defined in Distribution.Compiler

type Rep ( PerCompilerFlavor v) Source #
Instance details

Defined in Distribution.Compiler

Compiler id

data CompilerId Source #

Instances

Instances details
Eq CompilerId Source #
Instance details

Defined in Distribution.Compiler

Ord CompilerId Source #
Instance details

Defined in Distribution.Compiler

Read CompilerId Source #
Instance details

Defined in Distribution.Compiler

Show CompilerId Source #
Instance details

Defined in Distribution.Compiler

Generic CompilerId Source #
Instance details

Defined in Distribution.Compiler

Binary CompilerId Source #
Instance details

Defined in Distribution.Compiler

NFData CompilerId Source #
Instance details

Defined in Distribution.Compiler

Structured CompilerId Source #
Instance details

Defined in Distribution.Compiler

Pretty CompilerId Source #
Instance details

Defined in Distribution.Compiler

Parsec CompilerId Source #
Instance details

Defined in Distribution.Compiler

type Rep CompilerId Source #
Instance details

Defined in Distribution.Compiler

Compiler info

data CompilerInfo Source #

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

Constructors

CompilerInfo

Fields

Instances

Instances details
Read CompilerInfo Source #
Instance details

Defined in Distribution.Compiler

Show CompilerInfo Source #
Instance details

Defined in Distribution.Compiler

Generic CompilerInfo Source #
Instance details

Defined in Distribution.Compiler

Binary CompilerInfo Source #
Instance details

Defined in Distribution.Compiler

type Rep CompilerInfo Source #
Instance details

Defined in Distribution.Compiler

unknownCompilerInfo :: CompilerId -> AbiTag -> CompilerInfo Source #

Make a CompilerInfo of which only the known information is its CompilerId, its AbiTag and that it does not claim to be compatible with other compiler id's.

data AbiTag Source #

Instances

Instances details
Eq AbiTag Source #
Instance details

Defined in Distribution.Compiler

Read AbiTag Source #
Instance details

Defined in Distribution.Compiler

Show AbiTag Source #
Instance details

Defined in Distribution.Compiler

Generic AbiTag Source #
Instance details

Defined in Distribution.Compiler

Binary AbiTag Source #
Instance details

Defined in Distribution.Compiler

Structured AbiTag Source #
Instance details

Defined in Distribution.Compiler

Pretty AbiTag Source #
Instance details

Defined in Distribution.Compiler

Parsec AbiTag Source #
Instance details

Defined in Distribution.Compiler

type Rep AbiTag Source #
Instance details

Defined in Distribution.Compiler