Package hydra.typing

Class TermSignature

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TermSignature>

    public class TermSignature
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<TermSignature>
    A structured signature for a term: an ordered list of type parameters (with optional class constraints), an ordered list of value parameters, and a result. TermSignature is a richer view of TypeScheme: every TermSignature can be converted to a TypeScheme by erasing parameter names, descriptions, and laziness flags.
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.typing.TermSignature type.
      • TYPE_PARAMETERS

        public static final Name TYPE_PARAMETERS
        Name of the hydra.typing.TermSignature.typeParameters field.
      • PARAMETERS

        public static final Name PARAMETERS
        Name of the hydra.typing.TermSignature.parameters field.
      • RESULT

        public static final Name RESULT
        Name of the hydra.typing.TermSignature.result field.
      • typeParameters

        public final java.util.List<TypeParameter> typeParameters
        The type parameters of the term, in order
      • parameters

        public final java.util.List<Parameter> parameters
        The value parameters of the term, in order
      • result

        public final Result result
        The result of the term
    • Constructor Detail

      • TermSignature

        public TermSignature​(java.util.List<TypeParameter> typeParameters,
                             java.util.List<Parameter> parameters,
                             Result result)
        Constructs an immutable TermSignature.
        Parameters:
        typeParameters - The type parameters of the term, in order
        parameters - The value parameters of the term, in order
        result - The result of the term
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(TermSignature other)
        Specified by:
        compareTo in interface java.lang.Comparable<TermSignature>