orc.ast.oil
Class Def
java.lang.Object
orc.ast.oil.Def
public class Def
- extends java.lang.Object
A unit of syntax that encapsulates an expression definition.
Groups of mutually recursive definitions are scoped in the simplified abstract syntax tree by a Def.
- Author:
- dkitchin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
arity
public int arity
body
public Expr body
type
public ArrowType type
Def
public Def(int arity,
Expr body)
Def
public Def(int arity,
Expr body,
ArrowType type)
compile
public Def compile()
freeVars
public final java.util.Set<Var> freeVars()
addIndices
public void addIndices(java.util.Set<java.lang.Integer> indices,
int depth)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
type
public ArrowType type()
typecheck
public void typecheck(Env<Type> ctx)
throws TypeException
- Throws:
TypeException