ddc-source-tetra-0.4.3.1: Disciplined Disciple Compiler source language.

Safe HaskellSafe
LanguageHaskell98

DDC.Source.Tetra.Exp.Predicates

Contents

Description

Simple predicates on Source Tetra things.

Synopsis

Documentation

Atoms

isXVar :: GExp l -> Bool Source #

Check whether an expression is a variable.

isXCon :: GExp l -> Bool Source #

Check whether an expression is a constructor.

isAtomX :: GExp l -> Bool Source #

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

isAtomW :: GWitness l -> Bool Source #

Check whether a witness is a WVar or WCon.

Lambdas

isXLAM :: GExp l -> Bool Source #

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

isXLam :: GExp l -> Bool Source #

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

isLambdaX :: GExp l -> Bool Source #

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

Applications

isXApp :: GExp l -> Bool Source #

Check whether an expression is an XApp.

Let bindings

isXLet :: GExp l -> Bool Source #

Check whether an expression is a XLet.

Types and Witnesses

isXType :: GExp l -> Bool Source #

Check whether an expression is an XType

isXWitness :: GExp l -> Bool Source #

Check whether an expression is an XWitness

Patterns

isPDefault :: GPat l -> Bool Source #

Check whether a pattern is a PDefault.

isPVar :: GPat l -> Bool Source #

Check whether a pattern is a PVar.