ddc-core-0.4.1.3: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe-Inferred

DDC.Core.Predicates

Contents

Description

Simple predicates on core expressions.

Synopsis

Documentation

Atoms

isXVar :: Exp a n -> BoolSource

Check whether an expression is a variable.

isXCon :: Exp a n -> BoolSource

Check whether an expression is a constructor.

isAtomX :: Exp a n -> BoolSource

Check whether an expression is a XVar or an XCon, or some type or witness atom.

isAtomW :: Witness a n -> BoolSource

Check whether a witness is a WVar or WCon.

Lambdas

isXLAM :: Exp a n -> BoolSource

Check whether an expression is a spec abstraction (level-1).

isXLam :: Exp a n -> BoolSource

Check whether an expression is a value or witness abstraction (level-0).

isLambdaX :: Exp a n -> BoolSource

Check whether an expression is a spec, value, or witness abstraction.

Applications

isXApp :: Exp a n -> BoolSource

Check whether an expression is an XApp.

Let bindings

isXLet :: Exp a n -> BoolSource

Check whether an expression is a XLet.

Types and Witnesses

isXType :: Exp a n -> BoolSource

Check whether an expression is an XType.

isXWitness :: Exp a n -> BoolSource

Check whether an expression is an XWitness.

Patterns

isPDefault :: Pat n -> BoolSource

Check whether an alternative is a PDefault.