Agda-2.5.1.1: A dependently typed functional programming language and proof assistant

Safe HaskellNone
LanguageHaskell98

Agda.Compiler.Epic.AuxAST

Contents

Description

Intermediate abstract syntax tree used in the compiler. Pretty close to Epic syntax.

Synopsis

Documentation

data Fun Source #

Instances

Eq Fun Source # 

Methods

(==) :: Fun -> Fun -> Bool #

(/=) :: Fun -> Fun -> Bool #

Ord Fun Source # 

Methods

compare :: Fun -> Fun -> Ordering #

(<) :: Fun -> Fun -> Bool #

(<=) :: Fun -> Fun -> Bool #

(>) :: Fun -> Fun -> Bool #

(>=) :: Fun -> Fun -> Bool #

max :: Fun -> Fun -> Fun #

min :: Fun -> Fun -> Fun #

Show Fun Source # 

Methods

showsPrec :: Int -> Fun -> ShowS #

show :: Fun -> String #

showList :: [Fun] -> ShowS #

data Lit Source #

Instances

Eq Lit Source # 

Methods

(==) :: Lit -> Lit -> Bool #

(/=) :: Lit -> Lit -> Bool #

Ord Lit Source # 

Methods

compare :: Lit -> Lit -> Ordering #

(<) :: Lit -> Lit -> Bool #

(<=) :: Lit -> Lit -> Bool #

(>) :: Lit -> Lit -> Bool #

(>=) :: Lit -> Lit -> Bool #

max :: Lit -> Lit -> Lit #

min :: Lit -> Lit -> Lit #

Show Lit Source # 

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

data Expr Source #

Instances

Eq Expr Source # 

Methods

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

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

Ord Expr Source # 

Methods

compare :: Expr -> Expr -> Ordering #

(<) :: Expr -> Expr -> Bool #

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

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

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

max :: Expr -> Expr -> Expr #

min :: Expr -> Expr -> Expr #

Show Expr Source # 

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

data Branch Source #

Constructors

Branch 

Fields

BrInt 

Fields

Default 

Fields

Some smart constructors

lett :: Var -> Expr -> Expr -> Expr Source #

Smart constructor for let expressions to avoid unneceessary lets

lazy :: Expr -> Expr Source #

Some things are pointless to make lazy

casee :: Expr -> [Branch] -> Expr Source #

If casing on the same expression in a sub-expression, we know what branch to pick

apps :: Var -> [Expr] -> Expr Source #

Smart constructor for applications to avoid empty applications

Substitution

subst Source #

Arguments

:: Var

Substitute this ...

-> Var

with this ...

-> Expr

in this.

-> Expr 

Substitution

substs :: [(Var, Var)] -> Expr -> Expr Source #

fv :: Expr -> [Var] Source #

Get the free variables in an expression