Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Literal vt v loc
- = T
- | F
- | 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 (Type vt loc)
- | PosListTail v Int v (Type vt loc)
- | NegListInterval v IntervalSet
- | Effectful v
- | Let v (Term' vt v loc) (Type vt loc)
- prettyLiteral :: Var v => Literal (TypeVar b v) v loc -> Pretty ColorText
Documentation
data Literal vt v loc Source #
Refinement type literals (fig 3)
T | True |
F | False |
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 |
Let v (Term' vt v loc) (Type vt loc) | Introduce a binding for a term |