ddc-core-eval-0.2.1.2: Disciple Core language semantic evaluator.

Safe HaskellNone

DDC.Core.Eval.Compounds

Contents

Description

Utilities for constructing and destructing compound types and expressions.

Synopsis

Types

tUnit :: Type NameSource

Application of the Unit type constructor.

tInt :: Region Name -> Type NameSource

Application of the Int type constructor.

tPair :: Region Name -> Type Name -> Type Name -> Type NameSource

Application of the Pair type constructor.

tList :: Region Name -> Type Name -> Type NameSource

Application of the List type constructor.

Witnesses

isCapConW :: Witness Name -> BoolSource

Check whether a witness is a capability constructor.

Expressions

isUnitX :: Exp a Name -> BoolSource

Check whether an expression is the unit constructor.

takeHandleT :: Type Name -> Maybe RgnSource

Take a region handle from a type.

takeHandleX :: Exp a Name -> Maybe RgnSource

Take a region handle from an expression.

takeLocX :: Exp a Name -> Maybe LocSource

Take a store location from an expression. We strip off forget casts along the way

stripLocX :: Exp a Name -> Maybe LocSource

Take a store location from an expression, reaching under any forget casts.

takeMutableX :: Exp a Name -> Maybe RgnSource

Take a witness of mutability from an expression.