orc.type
Class TypeApplication

java.lang.Object
  extended by orc.type.Type
      extended by orc.type.TypeApplication

public class TypeApplication
extends Type

A type application, e.g. List[Boolean]

Author:
dkitchin

Field Summary
 java.util.List<Type> params
           
 Type type
           
 
Fields inherited from class orc.type.Type
BLANK, BOOLEAN, BOT, INTEGER, LET, NUMBER, STRING, TOP
 
Constructor Summary
TypeApplication(Type type, java.util.List<Type> params)
           
 
Method Summary
 void addConstraints(Env<java.lang.Boolean> VX, Type T, Constraint[] C)
           
 Type call(Env<Type> ctx, Env<Type> typectx, java.util.List<Arg> args, java.util.List<Type> typeActuals)
           
 Type call(java.util.List<Type> args)
           
 Type demote(Env<java.lang.Boolean> V)
           
 Variance findVariance(java.lang.Integer var)
           
 Type join(Type that)
           
 Type meet(Type that)
           
 Type promote(Env<java.lang.Boolean> V)
           
 Type subst(Env<Type> ctx)
           
 boolean subtype(Type that)
           
 java.lang.String toString()
           
 Type unwrapAs(Type T)
           
 
Methods inherited from class orc.type.Type
assertSubtype, closed, equal, freeVars, isBot, isTop, makeCallableInstance, substAll, supertype, variances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public Type type

params

public java.util.List<Type> params
Constructor Detail

TypeApplication

public TypeApplication(Type type,
                       java.util.List<Type> params)
Method Detail

subtype

public boolean subtype(Type that)
Overrides:
subtype in class Type

join

public Type join(Type that)
Overrides:
join in class Type

meet

public Type meet(Type that)
Overrides:
meet in class Type

call

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

call

public Type call(java.util.List<Type> args)
          throws TypeException
Overrides:
call in class Type
Throws:
TypeException

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)
             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

unwrapAs

public Type unwrapAs(Type T)
              throws TypeException
Overrides:
unwrapAs in class Type
Throws:
TypeException

toString

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