cabal-cargs-0.5: A command line program for extracting compiler arguments from a cabal file.

Safe HaskellNone

CabalCargs.CondVars

Synopsis

Documentation

data CondVars Source

The conditional variables that are used to resolve the conditionals inside of the cabal file. Holds the enable state of the cabal flags and the used OS and ARCH.

Constructors

CondVars 

Fields

flags :: FlagMap

initialized with the default flag values which are accordingly modified by the explicitely given flag values by the user

os :: OS

the used OS, by default the one cabal was build on or given explicitely by the user

arch :: Arch

the used ARCH, by default the one cabal was build on or given explicitely by the user

Instances

fromDefaults :: GenericPackageDescription -> CondVarsSource

Create a CondVars from the default flags of the cabal package description. The os and arch fields are initialized by the ones the cabal library was build on.

enableFlag :: FlagName -> CondVars -> CondVarsSource

Enable the given flag in CondVars.

disableFlag :: FlagName -> CondVars -> CondVarsSource

Disable the given flag in CondVars.

eval :: CondVars -> Condition ConfVar -> BoolSource

Evaluate the Condition using the CondVars.