orc.type.tycon
Class PolymorphicAliasedType

java.lang.Object
  extended by orc.type.Type
      extended by orc.type.tycon.Tycon
          extended by orc.type.tycon.PolymorphicAliasedType

public class PolymorphicAliasedType
extends Tycon

A type-level representation of a user-defined type alias with type parameters. Essentially this is a user-defined type constructor; the variances of the type parameters are inferred automatically from the aliased type itself.

Author:
dkitchin

Field Summary
 java.util.List<Variance> inferredVariances
           
 Type type
           
 
Fields inherited from class orc.type.Type
BOOLEAN, BOT, INTEGER, LET, NUMBER, SIGNAL, STRING, TOP
 
Constructor Summary
PolymorphicAliasedType(Type type, java.util.List<Variance> inferredVariances)
           
 
Method Summary
 java.util.Set<java.lang.Integer> freeVars()
           
 Type instance(java.util.List<Type> params)
           
 Type marshal()
          Convert to a syntactic type.
 
Methods inherited from class orc.type.tycon.Tycon
asTycon, equals, hashCode, instance, instance, makeCallableInstance
 
Methods inherited from class orc.type.Type
addConstraints, allFreeVars, assertSubtype, call, call, closed, demote, equal, findVariance, fromJavaClass, fromJavaMethod, fromJavaMethods, fromJavaType, fromJavaType, isBot, isTop, javaCounterpart, join, makeJavaCtx, makeJavaCtx, meet, promote, resolveSites, shiftFreeVars, subst, substAll, subtype, supertype, toString, unwrapAs, variances
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

inferredVariances

public java.util.List<Variance> inferredVariances

type

public Type type
Constructor Detail

PolymorphicAliasedType

public PolymorphicAliasedType(Type type,
                              java.util.List<Variance> inferredVariances)
Method Detail

instance

public Type instance(java.util.List<Type> params)
              throws TypeException
Overrides:
instance in class Tycon
Throws:
TypeException

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