cabal-lenses-0.15.0: Lenses and traversals for the Cabal library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

CabalLenses.CondVars

Synopsis

Documentation

data CondVars Source #

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

Constructors

CondVars 

Fields

  • flags :: FlagMap

    the enable state of the flags, initialized with the default flag values in the cabal file

  • os :: OS

    the used OS, by default the one cabal was build on

  • arch :: Arch

    the used ARCH, by default the one cabal was build on

  • compilerFlavor :: CompilerFlavor

    the used CompilerFlavor, by default the one cabal was build on

  • compilerVersion :: Maybe Version

    the user specified compiler version

Instances

Instances details
Show CondVars Source # 
Instance details

Defined in CabalLenses.CondVars

fromDefaults :: GenericPackageDescription -> CondVars Source #

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

enableFlag :: FlagName -> CondVars -> CondVars Source #

Enable the given flag in CondVars.

disableFlag :: FlagName -> CondVars -> CondVars Source #

Disable the given flag in CondVars.

eval :: CondVars -> Condition ConfVar -> Bool Source #

Evaluate the Condition using the CondVars.