Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Constraint vt v loc
- = PosCon v ConstructorReference [(v, Type vt loc)]
- | NegCon v ConstructorReference
- | PosEffect v EffectHandler [(v, Type vt loc)]
- | NegEffect v EffectHandler
- | PosLit v PmLit
- | NegLit v PmLit
- | PosListHead v Int v
- | PosListTail v Int v
- | NegListInterval v IntervalSet
- | Effectful v
- | Eq v v
- prettyConstraint :: forall vt v loc. (Var vt, Var v) => PrettyPrintEnv -> Constraint vt v loc -> Pretty ColorText
Documentation
data Constraint vt v loc Source #
A constraint to add to a normalized constraint
set (fig 6)
See addConstraint
PosCon v ConstructorReference [(v, Type vt loc)] | Positive constraint regarding data type. States that the given variable must be the given constructor, and it also binds variables corresponding to constructor arguments. |
NegCon v ConstructorReference | Negative constraint concerning data type. States that the given variable must not be the given constructor. |
PosEffect v EffectHandler [(v, Type vt loc)] | Positive constraint regarding data type. States that the given variable must be the given constructor, and it also binds variables corresponding to constructor arguments. |
NegEffect v EffectHandler | Negative constraint concerning data type. States that the given variable must not be the given constructor. |
PosLit v PmLit | Positive constraint regarding literal |
NegLit v PmLit | Negative constraint regarding literal |
PosListHead | Positive constraint on list element with position relative to head of list |
| |
PosListTail | Positive constraint on list element with position relative to end of list |
| |
NegListInterval v IntervalSet | Negative constraint on length of the list (i.e. the list may not be an element of the interval set) |
Effectful v | An effect is performed |
Eq v v | Equality constraint |
Instances
(Var vt, Eq v) => Eq (Constraint vt v loc) Source # | |
Defined in Unison.PatternMatchCoverage.Constraint (==) :: Constraint vt v loc -> Constraint vt v loc -> Bool # (/=) :: Constraint vt v loc -> Constraint vt v loc -> Bool # | |
(Var vt, Ord v) => Ord (Constraint vt v loc) Source # | |
Defined in Unison.PatternMatchCoverage.Constraint compare :: Constraint vt v loc -> Constraint vt v loc -> Ordering # (<) :: Constraint vt v loc -> Constraint vt v loc -> Bool # (<=) :: Constraint vt v loc -> Constraint vt v loc -> Bool # (>) :: Constraint vt v loc -> Constraint vt v loc -> Bool # (>=) :: Constraint vt v loc -> Constraint vt v loc -> Bool # max :: Constraint vt v loc -> Constraint vt v loc -> Constraint vt v loc # min :: Constraint vt v loc -> Constraint vt v loc -> Constraint vt v loc # |
prettyConstraint :: forall vt v loc. (Var vt, Var v) => PrettyPrintEnv -> Constraint vt v loc -> Pretty ColorText Source #