orc.ast.oil
Class Def
java.lang.Object
   orc.ast.oil.Def
orc.ast.oil.Def
- All Implemented Interfaces: 
- Locatable, Located
- public class Def 
- extends java.lang.Object- implements Locatable
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
typeArity
public int typeArity
argTypes
public java.util.List<Type> argTypes
resultType
public Type resultType
location
public SourceLocation location
Def
public Def(int arity,
           Expr body,
           int typeArity,
           java.util.List<Type> argTypes,
           Type resultType,
           SourceLocation location)
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:
- toStringin class- java.lang.Object
 
- 
 
type
public ArrowType type(Env<Type> typectx)
               throws InsufficientTypeInformationException
- 
 
- 
- Throws:
- InsufficientTypeInformationException
 
checkDef
public void checkDef(Env<Type> ctx,
                     Env<Type> typectx)
              throws TypeException
- 
 
- 
- Throws:
- TypeException
 
checkLambda
public void checkLambda(ArrowType t,
                        Env<Type> ctx,
                        Env<Type> typectx)
                 throws TypeException
- 
 
- 
- Throws:
- TypeException
 
setSourceLocation
public void setSourceLocation(SourceLocation location)
- 
- Specified by:
- setSourceLocationin interface- Locatable
 
- 
 
getSourceLocation
public SourceLocation getSourceLocation()
- 
- Specified by:
- getSourceLocationin interface- Located
 
-