Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Conflict sets
Intended for double import
import Distribution.Solver.Modular.ConflictSet (ConflictSet) import qualified Distribution.Solver.Modular.ConflictSet as CS
Synopsis
- data ConflictSet
- data Conflict
- type ConflictMap = Map (Var QPN) Int
- newtype OrderedVersionRange = OrderedVersionRange VR
- showConflictSet :: ConflictSet -> String
- showCSSortedByFrequency :: ConflictMap -> ConflictSet -> String
- showCSWithFrequency :: ConflictMap -> ConflictSet -> String
- toSet :: ConflictSet -> Set (Var QPN)
- toList :: ConflictSet -> [Var QPN]
- union :: ConflictSet -> ConflictSet -> ConflictSet
- unions :: [ConflictSet] -> ConflictSet
- insert :: Var QPN -> ConflictSet -> ConflictSet
- delete :: Var QPN -> ConflictSet -> ConflictSet
- empty :: ConflictSet
- singleton :: Var QPN -> ConflictSet
- singletonWithConflict :: Var QPN -> Conflict -> ConflictSet
- size :: ConflictSet -> Int
- member :: Var QPN -> ConflictSet -> Bool
- lookup :: Var QPN -> ConflictSet -> Maybe (Set Conflict)
- filter :: (a -> Bool) -> [a] -> [a]
- fromList :: [Var QPN] -> ConflictSet
Documentation
data ConflictSet Source #
The set of variables involved in a solver conflict, each paired with details about the conflict.
Instances
Show ConflictSet Source # | |
Defined in Distribution.Solver.Modular.ConflictSet showsPrec :: Int -> ConflictSet -> ShowS # show :: ConflictSet -> String # showList :: [ConflictSet] -> ShowS # | |
Eq ConflictSet Source # | |
Defined in Distribution.Solver.Modular.ConflictSet (==) :: ConflictSet -> ConflictSet -> Bool # (/=) :: ConflictSet -> ConflictSet -> Bool # |
More detailed information about how a conflict set variable caused a conflict. This information can be used to determine whether a second value for that variable would lead to the same conflict.
TODO: Handle dependencies under flags or stanzas.
GoalConflict QPN | The conflict set variable represents a package which depends on the specified problematic package. For example, the conflict set entry '(P x, GoalConflict y)' means that package x introduced package y, and y led to a conflict. |
VersionConstraintConflict QPN Ver | The conflict set variable represents a package with a constraint that excluded the specified package and version. For example, the conflict set entry '(P x, VersionConstraintConflict y (mkVersion [2, 0]))' means that package x's constraint on y excluded y-2.0. |
VersionConflict QPN OrderedVersionRange | The conflict set variable represents a package that was excluded by a constraint from the specified package. For example, the conflict set entry '(P x, VersionConflict y (orLaterVersion (mkVersion [2, 0])))' means that package y's constraint 'x >= 2.0' excluded some version of x. |
OtherConflict | Any other conflict. |
newtype OrderedVersionRange Source #
Version range with an Ord
instance.
Instances
Show OrderedVersionRange Source # | |
Defined in Distribution.Solver.Modular.ConflictSet showsPrec :: Int -> OrderedVersionRange -> ShowS # show :: OrderedVersionRange -> String # showList :: [OrderedVersionRange] -> ShowS # | |
Eq OrderedVersionRange Source # | |
Defined in Distribution.Solver.Modular.ConflictSet (==) :: OrderedVersionRange -> OrderedVersionRange -> Bool # (/=) :: OrderedVersionRange -> OrderedVersionRange -> Bool # | |
Ord OrderedVersionRange Source # | |
Defined in Distribution.Solver.Modular.ConflictSet compare :: OrderedVersionRange -> OrderedVersionRange -> Ordering # (<) :: OrderedVersionRange -> OrderedVersionRange -> Bool # (<=) :: OrderedVersionRange -> OrderedVersionRange -> Bool # (>) :: OrderedVersionRange -> OrderedVersionRange -> Bool # (>=) :: OrderedVersionRange -> OrderedVersionRange -> Bool # max :: OrderedVersionRange -> OrderedVersionRange -> OrderedVersionRange # min :: OrderedVersionRange -> OrderedVersionRange -> OrderedVersionRange # |
showConflictSet :: ConflictSet -> String Source #
showCSWithFrequency :: ConflictMap -> ConflictSet -> String Source #
union :: ConflictSet -> ConflictSet -> ConflictSet Source #
unions :: [ConflictSet] -> ConflictSet Source #
insert :: Var QPN -> ConflictSet -> ConflictSet Source #
delete :: Var QPN -> ConflictSet -> ConflictSet Source #
empty :: ConflictSet Source #
singletonWithConflict :: Var QPN -> Conflict -> ConflictSet Source #
size :: ConflictSet -> Int Source #