Class ForallType

java.lang.Object
net.hydromatic.morel.type.BaseType
net.hydromatic.morel.type.ForallType
All Implemented Interfaces:
Type

public class ForallType extends BaseType
Universally quantified type.
  • Field Details

    • parameterCount

      public final int parameterCount
    • type

      public final Type type
  • Constructor Details

    • ForallType

      ForallType(int parameterCount, Type type)
  • Method Details

    • key

      public Type.Key key()
      Description copied from interface: Type
      Description of the type, e.g. "int", "int -> int", "NONE | SOME of 'a".
    • accept

      public <R> R accept(TypeVisitor<R> typeVisitor)
    • copy

      public ForallType copy(TypeSystem typeSystem, UnaryOperator<Type> transform)
      Description copied from interface: Type
      Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.
    • substitute

      public Type substitute(TypeSystem typeSystem, List<? extends Type> types)
      Description copied from interface: Type
      Returns a copy of this type, specialized by substituting type parameters.