orc.type
Class TypeVariable
java.lang.Object
orc.type.Type
orc.type.TypeVariable
public class TypeVariable
- extends Type
A bound type variable.
Subtype comparisons may occur between types with bound variables (such as between
the type bodies of parametrized arrow types), so there is a subtype relation
specified for type variables: it is simply variable equality.
- Author:
- dkitchin
Methods inherited from class orc.type.Type |
assertSubtype, call, call, closed, equal, freeVars, isBot, isTop, join, makeCallableInstance, meet, substAll, supertype, unwrapAs, variances |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
index
public int index
TypeVariable
public TypeVariable(int index)
subtype
public boolean subtype(Type that)
- Overrides:
subtype
in class Type
subst
public Type subst(Env<Type> ctx)
- Overrides:
subst
in class Type
findVariance
public Variance findVariance(java.lang.Integer var)
- Overrides:
findVariance
in class Type
promote
public Type promote(Env<java.lang.Boolean> V)
- Overrides:
promote
in class Type
demote
public Type demote(Env<java.lang.Boolean> V)
- Overrides:
demote
in class Type
addConstraints
public void addConstraints(Env<java.lang.Boolean> VX,
Type T,
Constraint[] C)
throws TypeException
- Overrides:
addConstraints
in class Type
- Throws:
TypeException
toString
public java.lang.String toString()
- Overrides:
toString
in class Type