Module aya.base

Record Class PatClassifier

java.lang.Object
java.lang.Record
org.aya.tyck.pat.PatClassifier
All Implemented Interfaces:
Problematic, Stateful, org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>

public record PatClassifier(@NotNull AbstractTycker delegate, @NotNull org.aya.util.error.SourcePos pos) extends Record implements org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>, Stateful, Problematic
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatClassifier(@NotNull AbstractTycker delegate, @NotNull org.aya.util.error.SourcePos pos)
    Creates an instance of a PatClassifier record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>
    add(kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, org.aya.syntax.core.term.Term term)
     
    static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>>>
    classify(@NotNull kala.collection.SeqView<? extends @NotNull org.aya.syntax.core.pat.Pat.Preclause<?>> clauses, @NotNull kala.collection.SeqView<org.aya.syntax.core.term.Param> telescope, @NotNull AbstractTycker tycker, @NotNull org.aya.util.error.SourcePos pos)
     
    @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<org.aya.syntax.core.term.Term>>
    classify1(@NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, @NotNull org.aya.syntax.core.term.Param param, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.Indexed<org.aya.syntax.core.pat.Pat>> clauses, int fuel)
     
    Returns the value of the delegate record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    static int[]
    firstMatchDomination(@NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.error.SourceNode> clauses, @NotNull org.aya.util.reporter.Reporter reporter, @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.tyck.pat.PatClass<?>> classes)
     
    final int
    Returns a hash code value for this object.
    org.aya.syntax.core.pat.Pat
    normalize(org.aya.syntax.core.pat.Pat pat)
     
    @NotNull org.aya.util.error.SourcePos
    pos()
    Returns the value of the pos record component.
    @NotNull org.aya.util.reporter.Reporter
     
    @NotNull TyckState
     
    org.aya.syntax.core.term.Param
    subst(kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, org.aya.syntax.core.term.Param param)
     
    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

    Methods inherited from interface org.aya.util.tyck.pat.ClassifierUtil

    classifyN

    Methods inherited from interface org.aya.tyck.tycker.Problematic

    fail, fail, fail

    Methods inherited from interface org.aya.tyck.tycker.Stateful

    freezeHoles, solve, whnf
  • Constructor Details

    • PatClassifier

      public PatClassifier(@NotNull @NotNull AbstractTycker delegate, @NotNull @NotNull org.aya.util.error.SourcePos pos)
      Creates an instance of a PatClassifier record class.
      Parameters:
      delegate - the value for the delegate record component
      pos - the value for the pos record component
  • Method Details

    • subst

      public org.aya.syntax.core.term.Param subst(kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, org.aya.syntax.core.term.Param param)
      Specified by:
      subst in interface org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>
    • state

      @NotNull public @NotNull TyckState state()
      Specified by:
      state in interface Stateful
    • reporter

      @NotNull public @NotNull org.aya.util.reporter.Reporter reporter()
      Specified by:
      reporter in interface Problematic
    • normalize

      public org.aya.syntax.core.pat.Pat normalize(org.aya.syntax.core.pat.Pat pat)
      Specified by:
      normalize in interface org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>
    • add

      public kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> add(kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, org.aya.syntax.core.term.Term term)
      Specified by:
      add in interface org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>
    • classify

      @NotNull public static @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>>> classify(@NotNull @NotNull kala.collection.SeqView<? extends @NotNull org.aya.syntax.core.pat.Pat.Preclause<?>> clauses, @NotNull @NotNull kala.collection.SeqView<org.aya.syntax.core.term.Param> telescope, @NotNull @NotNull AbstractTycker tycker, @NotNull @NotNull org.aya.util.error.SourcePos pos)
    • classify1

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.PatClass<org.aya.syntax.core.term.Term>> classify1(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term> subst, @NotNull @NotNull org.aya.syntax.core.term.Param param, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.tyck.pat.Indexed<org.aya.syntax.core.pat.Pat>> clauses, int fuel)
      Specified by:
      classify1 in interface org.aya.util.tyck.pat.ClassifierUtil<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.term.Term>,org.aya.syntax.core.term.Term,org.aya.syntax.core.term.Param,org.aya.syntax.core.pat.Pat>
    • firstMatchDomination

      public static int[] firstMatchDomination(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.error.SourceNode> clauses, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<? extends org.aya.util.tyck.pat.PatClass<?>> classes)
    • 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.
    • delegate

      @NotNull public @NotNull AbstractTycker delegate()
      Returns the value of the delegate record component.
      Returns:
      the value of the delegate 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