orc.type.structured
Class ArrowType

java.lang.Object
  extended by orc.type.Type
      extended by orc.type.structured.ArrowType

public class ArrowType
extends Type


Field Summary
 java.util.List<Type> argTypes
           
 Type resultType
           
 int typeArity
           
 
Fields inherited from class orc.type.Type
BOOLEAN, BOT, INTEGER, LET, NUMBER, SIGNAL, STRING, TOP
 
Constructor Summary
ArrowType(java.util.List<Type> argTypes, Type resultType)
           
ArrowType(java.util.List<Type> argTypes, Type resultType, int typeArity)
           
ArrowType(Type resultType)
           
ArrowType(Type resultType, int typeArity)
           
ArrowType(Type argType, Type resultType)
           
ArrowType(Type argType, Type resultType, int typeArity)
           
ArrowType(Type firstArgType, Type secondArgType, Type resultType)
           
ArrowType(Type firstArgType, Type secondArgType, Type resultType, int typeArity)
           
 
Method Summary
 void addConstraints(Env<java.lang.Boolean> VX, Type T, Constraint[] C)
           
 Type call(TypingContext ctx, java.util.List<Argument> args, java.util.List<Type> typeActuals)
           
 Type demote(Env<java.lang.Boolean> V)
           
 Variance findVariance(java.lang.Integer var)
           
protected  ArrowType forceArrow(Type that)
           
 java.util.Set<java.lang.Integer> freeVars()
           
 Type join(Type that)
           
 Type marshal()
          Convert to a syntactic type.
 Type meet(Type that)
           
 Type promote(Env<java.lang.Boolean> V)
           
 Type subst(Env<Type> ctx)
           
 boolean subtype(Type that)
           
 java.lang.String toString()
           
 
Methods inherited from class orc.type.Type
allFreeVars, assertSubtype, asTycon, call, closed, equal, fromJavaClass, fromJavaMethod, fromJavaMethods, fromJavaType, fromJavaType, isBot, isTop, javaCounterpart, makeJavaCtx, makeJavaCtx, resolveSites, shiftFreeVars, substAll, supertype, unwrapAs, variances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

argTypes

public java.util.List<Type> argTypes

resultType

public Type resultType

typeArity

public int typeArity
Constructor Detail

ArrowType

public ArrowType(Type resultType)

ArrowType

public ArrowType(Type argType,
                 Type resultType)

ArrowType

public ArrowType(Type firstArgType,
                 Type secondArgType,
                 Type resultType)

ArrowType

public ArrowType(java.util.List<Type> argTypes,
                 Type resultType)

ArrowType

public ArrowType(Type resultType,
                 int typeArity)

ArrowType

public ArrowType(Type argType,
                 Type resultType,
                 int typeArity)

ArrowType

public ArrowType(Type firstArgType,
                 Type secondArgType,
                 Type resultType,
                 int typeArity)

ArrowType

public ArrowType(java.util.List<Type> argTypes,
                 Type resultType,
                 int typeArity)
Method Detail

forceArrow

protected ArrowType forceArrow(Type that)

subtype

public boolean subtype(Type that)
                throws TypeException
Overrides:
subtype in class Type
Throws:
TypeException

join

public Type join(Type that)
          throws TypeException
Overrides:
join in class Type
Throws:
TypeException

meet

public Type meet(Type that)
          throws TypeException
Overrides:
meet in class Type
Throws:
TypeException

call

public Type call(TypingContext ctx,
                 java.util.List<Argument> args,
                 java.util.List<Type> typeActuals)
          throws TypeException
Overrides:
call in class Type
Throws:
TypeException

subst

public Type subst(Env<Type> ctx)
           throws TypeException
Overrides:
subst in class Type
Throws:
TypeException

findVariance

public Variance findVariance(java.lang.Integer var)
Overrides:
findVariance in class Type

promote

public Type promote(Env<java.lang.Boolean> V)
             throws TypeException
Overrides:
promote in class Type
Throws:
TypeException

demote

public Type demote(Env<java.lang.Boolean> V)
            throws TypeException
Overrides:
demote in class Type
Throws:
TypeException

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

marshal

public Type marshal()
             throws UnrepresentableTypeException
Description copied from class: Type
Convert to a syntactic type. May return null if the type is not representable.

Overrides:
marshal in class Type
Returns:
The syntactic type corresponding to this type
Throws:
UnrepresentableTypeException

freeVars

public java.util.Set<java.lang.Integer> freeVars()
Overrides:
freeVars in class Type