cabal-install-solver-3.12.1.0: The command-line interface for Cabal and Hackage.

Safe Haskell | None
Language | Haskell2010

Distribution.Solver.Modular.Flag

Synopsis

- data FInfo = FInfo {
  - fdefault :: Bool
  - fmanual :: FlagType
  - fweak :: WeakOrTrivial
  }
- type Flag = FlagName
- type FlagInfo = Map Flag FInfo
- data FN qpn = FN qpn Flag
- type QFN = FN QPN
- type QSN = SN QPN
- type Stanza = OptionalStanza
- data SN qpn = SN qpn Stanza
- newtype WeakOrTrivial = WeakOrTrivial {
  - unWeakOrTrivial :: Bool
  }
- data FlagValue
  - = FlagTrue
  - | FlagFalse
  - | FlagBoth
- mkFlag :: String -> Flag
- showQFN :: QFN -> String
- showQFNBool :: QFN -> Bool -> String
- showFlagValue :: FlagName -> FlagValue -> String
- showQSN :: QSN -> String
- showQSNBool :: QSN -> Bool -> String
- showSBool :: Stanza -> Bool -> String

# Documentation

data FInfo Source #

Flag info. Default value, whether the flag is manual, and whether the flag is weak. Manual flags can only be set explicitly. Weak flags are typically deferred by the solver.

Constructors

FInfo |

Fields

- fdefault :: Bool
- fmanual :: FlagType
- fweak :: WeakOrTrivial

#### Instances

Instances details

Show FInfo Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods showsPrec :: Int -> FInfo -> ShowS Source # show :: FInfo -> String Source # showList :: [FInfo] -> ShowS Source #
Eq FInfo Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods (==) :: FInfo -> FInfo -> Bool Source # (/=) :: FInfo -> FInfo -> Bool Source #

type Flag = FlagName Source #

Flag identifier. Just a string.

type FlagInfo = Map Flag FInfo Source #

Flag defaults.

data FN qpn Source #

Flag name. Consists of a package instance and the flag identifier itself.

Constructors

FN qpn Flag |

#### Instances

Instances details

Functor FN Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods fmap :: (a -> b) -> FN a -> FN b Source # (<$) :: a -> FN b -> FN a Source #
Show qpn => Show (FN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods showsPrec :: Int -> FN qpn -> ShowS Source # show :: FN qpn -> String Source # showList :: [FN qpn] -> ShowS Source #
Eq qpn => Eq (FN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods (==) :: FN qpn -> FN qpn -> Bool Source # (/=) :: FN qpn -> FN qpn -> Bool Source #
Ord qpn => Ord (FN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods compare :: FN qpn -> FN qpn -> Ordering Source # (<) :: FN qpn -> FN qpn -> Bool Source # (<=) :: FN qpn -> FN qpn -> Bool Source # (>) :: FN qpn -> FN qpn -> Bool Source # (>=) :: FN qpn -> FN qpn -> Bool Source # max :: FN qpn -> FN qpn -> FN qpn Source # min :: FN qpn -> FN qpn -> FN qpn Source #

type QFN = FN QPN Source #

Qualified flag name.

type QSN = SN QPN Source #

Qualified stanza name.

type Stanza = OptionalStanza Source #

Stanza identifier.

data SN qpn Source #

Stanza name. Paired with a package name, much like a flag.

Constructors

SN qpn Stanza |

#### Instances

Instances details

Functor SN Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods fmap :: (a -> b) -> SN a -> SN b Source # (<$) :: a -> SN b -> SN a Source #
Show qpn => Show (SN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods showsPrec :: Int -> SN qpn -> ShowS Source # show :: SN qpn -> String Source # showList :: [SN qpn] -> ShowS Source #
Eq qpn => Eq (SN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods (==) :: SN qpn -> SN qpn -> Bool Source # (/=) :: SN qpn -> SN qpn -> Bool Source #
Ord qpn => Ord (SN qpn) Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods compare :: SN qpn -> SN qpn -> Ordering Source # (<) :: SN qpn -> SN qpn -> Bool Source # (<=) :: SN qpn -> SN qpn -> Bool Source # (>) :: SN qpn -> SN qpn -> Bool Source # (>=) :: SN qpn -> SN qpn -> Bool Source # max :: SN qpn -> SN qpn -> SN qpn Source # min :: SN qpn -> SN qpn -> SN qpn Source #

newtype WeakOrTrivial Source #

A property of flag and stanza choices that determines whether the choice should be deferred in the solving process.

A choice is called weak if we do want to defer it. This is the case for flags that should be implied by what's currently installed on the system, as opposed to flags that are used to explicitly enable or disable some functionality.

A choice is called trivial if it clearly does not matter. The special case of triviality we actually consider is if there are no new dependencies introduced by the choice.

Constructors

WeakOrTrivial |

Fields

- unWeakOrTrivial :: Bool

#### Instances

Instances details

Show WeakOrTrivial Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods showsPrec :: Int -> WeakOrTrivial -> ShowS Source # show :: WeakOrTrivial -> String Source # showList :: [WeakOrTrivial] -> ShowS Source #
Eq WeakOrTrivial Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods (==) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source # (/=) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source #
Ord WeakOrTrivial Source # |

Instance details

Defined in Distribution.Solver.Modular.Flag

Methods

compare :: WeakOrTrivial -> WeakOrTrivial -> Ordering Source #

(<) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source #

(<=) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source #

(>) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source #

(>=) :: WeakOrTrivial -> WeakOrTrivial -> Bool Source #

max :: WeakOrTrivial -> WeakOrTrivial -> WeakOrTrivial Source #

min :: WeakOrTrivial -> WeakOrTrivial -> WeakOrTrivial Source #

data FlagValue Source #

Value shown for a flag in a solver log message. The message can refer to only the true choice, only the false choice, or both choices.

Constructors

FlagTrue |
FlagFalse |
FlagBoth |

#### Instances

Instances details

Show FlagValue Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods showsPrec :: Int -> FlagValue -> ShowS Source # show :: FlagValue -> String Source # showList :: [FlagValue] -> ShowS Source #
Eq FlagValue Source # |
Instance details Defined in Distribution.Solver.Modular.Flag Methods (==) :: FlagValue -> FlagValue -> Bool Source # (/=) :: FlagValue -> FlagValue -> Bool Source #

mkFlag :: String -> Flag Source #

showQFN :: QFN -> String Source #

showQFNBool :: QFN -> Bool -> String Source #

showFlagValue :: FlagName -> FlagValue -> String Source #

String representation of a flag-value pair.

showQSN :: QSN -> String Source #

showQSNBool :: QSN -> Bool -> String Source #

showSBool :: Stanza -> Bool -> String Source #