Package net.hydromatic.morel.type
Class FnType
java.lang.Object
net.hydromatic.morel.type.BaseType
net.hydromatic.morel.type.FnType
- All Implemented Interfaces:
Type
The type of a function value.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(TypeVisitor<R> typeVisitor) booleancanCallArgOf(Type type) Whether this type is a function that can call an argument of given type.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.gMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.hydromatic.morel.type.Type
arg, isCollection, isFinite, isProgressive, moniker, specializes, substitute, unifyWith
-
Field Details
-
paramType
-
resultType
-
-
Constructor Details
-
FnType
-
-
Method Details
-
key
Description copied from interface:TypeDescription of the type, e.g. "int", "int -> int", "NONE | SOME of 'a". -
accept
-
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. -
canCallArgOf
Description copied from interface:TypeWhether this type is a function that can call an argument of given type.For example:
intis not a function and therefore resultsfalsefor all argument types;bool -> intcan call arguments of typebooland'abut notintor('a, 'b);forall 'a. 'a list -> boolcan call arguments of typeint listandstring list listbut notint option.
-