orc.type
Class Datatype

java.lang.Object
  extended by orc.type.Type
      extended by orc.type.Tycon
          extended by orc.type.Datatype

public class Datatype
extends Tycon

Type constructor encompassing all type-level information associated with a datatype. This tycon will be passed as a type parameter to the Datatype site, which when typechecked will return a tuple of the constructor types. This may seem slightly obtuse, but it makes the earlier translation steps easier while still guaranteeing that all type information can be discarded from an OIL file without affecting its runtime semantics. If datatype declarations simultaneously had static and dynamic semantics, that would not be true. So, this is the isolated static component of the datatype declaration.

Author:
dkitchin

Field Summary
 
Fields inherited from class orc.type.Type
BLANK, BOOLEAN, BOT, INTEGER, LET, NUMBER, STRING, TOP
 
Constructor Summary
Datatype(java.lang.String name, java.util.List<Variance> vs, java.util.List<java.util.List<Type>> cs)
           
 
Method Summary
 java.util.List<java.util.List<Type>> getConstructors()
           
 Type subst(Env<Type> ctx)
           
 java.lang.String toString()
           
 java.util.List<Variance> variances()
           
 
Methods inherited from class orc.type.Tycon
instance, instance
 
Methods inherited from class orc.type.Type
addConstraints, assertSubtype, call, call, closed, demote, equal, findVariance, freeVars, isBot, isTop, join, makeCallableInstance, meet, promote, substAll, subtype, supertype, unwrapAs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Datatype

public Datatype(java.lang.String name,
                java.util.List<Variance> vs,
                java.util.List<java.util.List<Type>> cs)
Method Detail

variances

public java.util.List<Variance> variances()
Overrides:
variances in class Type

getConstructors

public java.util.List<java.util.List<Type>> getConstructors()

subst

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

toString

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