unison-parser-typechecker-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.PatternMatchCoverage.Literal

Synopsis

Documentation

data Literal vt v loc Source #

Refinement type literals (fig 3)

Constructors

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

Fields

  • v

    list root

  • Int

    cons position (0 is head)

  • v

    element variable

  • (Type vt loc)
     
PosListTail

Positive constraint on list element with position relative to end of list

Fields

  • v

    list root

  • Int

    snoc position (0 is last)

  • v

    element variable

  • (Type vt loc)
     
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

Instances

Instances details
(Show v, Show vt) => Show (Literal vt v loc) Source # 
Instance details

Defined in Unison.PatternMatchCoverage.Literal

Methods

showsPrec :: Int -> Literal vt v loc -> ShowS #

show :: Literal vt v loc -> String #

showList :: [Literal vt v loc] -> ShowS #