Agda.Compiler.Epic.AuxAST
Contents
Description
Intermediate abstract syntax tree used in the compiler. Pretty close to Epic syntax.
- type Comment = String
- type Inline = Bool
- data Fun
- data Lit
- data Expr
- data Branch
- getBrVars :: Branch -> [Var]
- lett :: Var -> Expr -> Expr -> Expr
- lazy :: Expr -> Expr
- casee :: Expr -> [Branch] -> Expr
- apps :: Var -> [Expr] -> Expr
- subst :: Var -> Var -> Expr -> Expr
- substs :: [(Var, Var)] -> Expr -> Expr
- substBranch :: Var -> Var -> Branch -> Branch
- fv :: Expr -> [Var]
Documentation
data Fun
data Lit
data Expr
Some smart constructors
casee :: Expr -> [Branch] -> Expr
If casing on the same expression in a sub-expression, we know what branch to pick
Substitution
substBranch :: Var -> Var -> Branch -> Branch