Package net.hydromatic.morel.type
Class MultiType
java.lang.Object
net.hydromatic.morel.type.MultiType
- All Implemented Interfaces:
Type
Overloaded type.
Not really a type, just a way for a BuiltIn.typeFunction to
indicate that it is overloaded. An overloaded function has a type that is a
MultiType. Each of those types must be a function type and must
differ on the argument type.
For example, int -> int and int * string -> real is a good
pair of overloads. int -> int and int -> int -> string is not
a good pair of overloads because both have int as the argument type.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(TypeVisitor<R> typeVisitor) copy(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.key()Description of the type, e.gop()Type operator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.hydromatic.morel.type.Type
arg, canCallArgOf, isCollection, isFinite, isProgressive, moniker, specializes, substitute, unifyWith
-
Field Details
-
types
-
-
Constructor Details
-
MultiType
-
-
Method Details
-
key
Description copied from interface:TypeDescription of the type, e.g. "int", "int -> int", "NONE | SOME of 'a". -
op
Description copied from interface:TypeType operator. -
copy
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
-