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 #

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

type Flag = FlagName #

Flag identifier. Just a string.

type FlagInfo = Map Flag FInfo #

Flag defaults.

data FN qpn #

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

Constructors

FN qpn Flag |

#### Instances

Instances details

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

type QFN = FN QPN #

Qualified flag name.

type QSN = SN QPN #

Qualified stanza name.

type Stanza = OptionalStanza #

Stanza identifier.

data SN qpn #

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

Constructors

SN qpn Stanza |

#### Instances

Instances details

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

newtype WeakOrTrivial #

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

Instance details

Defined in Distribution.Solver.Modular.Flag

Methods

compare :: WeakOrTrivial -> WeakOrTrivial -> Ordering #

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

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

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

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

max :: WeakOrTrivial -> WeakOrTrivial -> WeakOrTrivial #

min :: WeakOrTrivial -> WeakOrTrivial -> WeakOrTrivial #

data FlagValue #

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

mkFlag :: String -> Flag #

showQFN :: QFN -> String #

showQFNBool :: QFN -> Bool -> String #

showFlagValue :: FlagName -> FlagValue -> String #

String representation of a flag-value pair.

showQSN :: QSN -> String #

showQSNBool :: QSN -> Bool -> String #

showSBool :: Stanza -> Bool -> String #