Package net.hydromatic.morel.type
Class TemporaryType
- java.lang.Object
-
- net.hydromatic.morel.type.BaseType
-
- net.hydromatic.morel.type.ParameterizedType
-
- net.hydromatic.morel.type.DataType
-
- net.hydromatic.morel.type.TemporaryType
-
public class TemporaryType extends DataType
Placeholder for a type that is being recursively defined.For example, while defining datatype "list" as follows,
datatype 'a list = NIL | CONS of ('a, 'a list)we define a temporary type "list", it is used in
CONS, and later we convert it to the real data type "list".
-
-
Field Summary
-
Fields inherited from class net.hydromatic.morel.type.DataType
typeConstructors
-
Fields inherited from class net.hydromatic.morel.type.ParameterizedType
moniker, name, parameterTypes
-
-
Constructor Summary
Constructors Constructor Description TemporaryType(String name, List<? extends Type> parameterTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(TypeVisitor<R> typeVisitor)TemporaryTypecopy(TypeSystem typeSystem, UnaryOperator<Type> transform)Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.protected Typesubstitute2(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)Second part of the implementation ofDataType.substitute(TypeSystem, List, TypeSystem.Transaction), called if there is not already a type of the given description.-
Methods inherited from class net.hydromatic.morel.type.DataType
def, key, substitute
-
Methods inherited from class net.hydromatic.morel.type.ParameterizedType
computeMoniker, moniker, name, toString
-
-
-
-
Method Detail
-
copy
public TemporaryType copy(TypeSystem typeSystem, UnaryOperator<Type> transform)
Description copied from interface:TypeCopies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.
-
accept
public <R> R accept(TypeVisitor<R> typeVisitor)
-
substitute2
protected Type substitute2(TypeSystem typeSystem, List<? extends Type> types, TypeSystem.Transaction transaction)
Description copied from class:DataTypeSecond part of the implementation ofDataType.substitute(TypeSystem, List, TypeSystem.Transaction), called if there is not already a type of the given description.- Overrides:
substitute2in classDataType
-
-