free-compiler-0.3.0.0: A Haskell to Coq compiler.

Safe HaskellNone
LanguageHaskell2010

FreeC.LiftedIR.Syntax.Expr

Description

This module contains the definition of expressions for our lifted intermediate language.

Synopsis

Documentation

data Expr Source #

An expression.

Constructors

Con

A constructor.

SmartCon

A smart constructor.

Var

A function or local variable.

App

Function or constructor application.

Fields

If

if expression.

Case

case expression.

Undefined

Error term undefined.

Fields

ErrorExpr

Error term error.

Fields

Trace

Effect trace.

Fields

IntLiteral

An integer literal.

StringLiteral

A string literal.

Lambda

A lambda abstraction.

Pure

The pure constructor of the Free monad.

Fields

Bind

The bind operator for the free monad.

Fields

Share

The share operator.

Instances
Eq Expr Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

Methods

(==) :: Expr -> Expr -> Bool Source #

(/=) :: Expr -> Expr -> Bool Source #

Show Expr Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

data Alt Source #

One alternative of a case expression.

Constructors

Alt 
Instances
Eq Alt Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

Methods

(==) :: Alt -> Alt -> Bool Source #

(/=) :: Alt -> Alt -> Bool Source #

Show Alt Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

data ConPat Source #

A constructor pattern used in an alternative of a case expression.

The main purpose of this data type is to add location information to a ConName.

Constructors

ConPat 
Instances
Eq ConPat Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

Show ConPat Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

data VarPat Source #

A variable pattern used as an argument to a function, lambda abstraction or constructor pattern.

The variable pattern can optionally have a type signature.

Constructors

VarPat 
Instances
Eq VarPat Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr

Show VarPat Source # 
Instance details

Defined in FreeC.LiftedIR.Syntax.Expr