Interface Type

    • Method Detail

      • key

        Type.Key key()
        Description of the type, e.g. "int", "int -> int", "NONE | SOME of 'a".
      • moniker

        default String moniker()
        Key of the type.

        Often the same as key(), but an exception is datatype. For example, datatype "'a option" has moniker and name "option" and description "NONE | SOME of 'a".

        Use the description if you are looking for a type that is structurally equivalent. Use the moniker to identify it when printing.

      • op

        Op op()
        Type operator.
      • copy

        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.
      • accept

        <R> R accept​(TypeVisitor<R> typeVisitor)