orc.type
Class Datatype
java.lang.Object
orc.type.Type
orc.type.Tycon
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
Constructor Summary |
Datatype(java.lang.String name,
java.util.List<Variance> vs,
java.util.List<java.util.List<Type>> cs)
|
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 |
Datatype
public Datatype(java.lang.String name,
java.util.List<Variance> vs,
java.util.List<java.util.List<Type>> cs)
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