Module aya.base

Record Class PatClassifier

java.lang.Object
java.lang.Record
org.aya.tyck.pat.PatClassifier

public record PatClassifier(@NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.util.error.SourcePos pos, @NotNull TyckState state, PatTree.Builder builder) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatClassifier(@NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.util.error.SourcePos pos, @NotNull TyckState state, PatTree.Builder builder)
    Creates an instance of a PatClassifier record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the builder record component.
    static @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr>
    classify(@NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull Tycker tycker, @NotNull org.aya.util.error.SourcePos pos)
     
    static @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr>
    classify(@NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull TyckState state, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.util.error.SourcePos pos)
     
    static void
    confluence(PatTycker.PatResult clauses, @NotNull ExprTycker tycker, @NotNull org.aya.util.error.SourcePos pos, @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> mct)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    static int[]
    firstMatchDomination(@NotNull kala.collection.immutable.ImmutableSeq<Pattern.Clause> clauses, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> mct)
     
    final int
    Returns a hash code value for this object.
    @NotNull org.aya.util.error.SourcePos
    pos()
    Returns the value of the pos record component.
    @NotNull org.aya.util.reporter.Reporter
    Returns the value of the reporter record component.
    @NotNull TyckState
    Returns the value of the state record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PatClassifier

      public PatClassifier(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull TyckState state, @NotNull PatTree.Builder builder)
      Creates an instance of a PatClassifier record class.
      Parameters:
      reporter - the value for the reporter record component
      pos - the value for the pos record component
      state - the value for the state record component
      builder - the value for the builder record component
  • Method Details

    • classify

      @NotNull public static @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> classify(@NotNull @NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull @NotNull Tycker tycker, @NotNull @NotNull org.aya.util.error.SourcePos pos)
    • classify

      @VisibleForTesting @NotNull public static @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> classify(@NotNull @NotNull kala.collection.SeqLike<? extends @NotNull Pat.Preclause<?>> clauses, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term.Param> telescope, @NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.util.error.SourcePos pos)
    • firstMatchDomination

      public static int[] firstMatchDomination(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<Pattern.Clause> clauses, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> mct)
    • confluence

      public static void confluence(@NotNull PatTycker.PatResult clauses, @NotNull @NotNull ExprTycker tycker, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull org.aya.util.tyck.MCT<Term,PatClassifier.PatErr> mct)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • reporter

      @NotNull public @NotNull org.aya.util.reporter.Reporter reporter()
      Returns the value of the reporter record component.
      Returns:
      the value of the reporter record component
    • pos

      @NotNull public @NotNull org.aya.util.error.SourcePos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • state

      @NotNull public @NotNull TyckState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • builder

      @NotNull public PatTree.Builder builder()
      Returns the value of the builder record component.
      Returns:
      the value of the builder record component