orc.type.structured
Class MultiType

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

public class MultiType
extends Type

A composite type supporting ad-hoc polymorphic calls. Contains a list of types; when this type is used in call position, it will be typechecked using each type in the list sequentially until one succeeds.

Author:
dkitchin

Field Summary
 
Fields inherited from class orc.type.Type
BOOLEAN, BOT, INTEGER, LET, NUMBER, SIGNAL, STRING, TOP
 
Constructor Summary
MultiType(java.util.List<Type> alts)
           
MultiType(Type A, Type B)
           
 
Method Summary
 Type call(TypingContext ctx, java.util.List<Argument> args, java.util.List<Type> typeActuals)
           
 java.util.Set<java.lang.Integer> freeVars()
           
 boolean subtype(Type that)
           
 java.lang.String toString()
           
 
Methods inherited from class orc.type.Type
addConstraints, allFreeVars, assertSubtype, asTycon, call, closed, demote, equal, findVariance, fromJavaClass, fromJavaMethod, fromJavaMethods, fromJavaType, fromJavaType, isBot, isTop, javaCounterpart, join, makeJavaCtx, makeJavaCtx, marshal, meet, promote, resolveSites, shiftFreeVars, subst, substAll, supertype, unwrapAs, variances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiType

public MultiType(java.util.List<Type> alts)

MultiType

public MultiType(Type A,
                 Type B)
Method Detail

subtype

public boolean subtype(Type that)
                throws TypeException
Overrides:
subtype 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

toString

public java.lang.String toString()
Overrides:
toString in class Type

freeVars

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