Module aya.base
Package org.aya.unify

Class TermComparator

All Implemented Interfaces:
Contextful, Problematic, Stateful
Direct Known Subclasses:
Unifier

public abstract sealed class TermComparator extends AbstractTycker permits Unifier
  • Field Details

    • pos

      @NotNull protected final @NotNull org.aya.util.error.SourcePos pos
    • cmp

      @NotNull protected @NotNull org.aya.util.Ordering cmp
  • Constructor Details

    • TermComparator

      public TermComparator(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.syntax.ref.LocalCtx ctx, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull org.aya.util.Ordering cmp)
  • Method Details

    • doSolveMeta

      @Nullable protected abstract @Nullable org.aya.syntax.core.term.Term doSolveMeta(@NotNull @NotNull org.aya.syntax.core.term.call.MetaCall meta, @NotNull @NotNull org.aya.syntax.core.term.Term rhs, @Nullable @Nullable org.aya.syntax.core.term.Term type)
      Trying to solve with
      Parameters:
      rhs - in whnf
    • solveMeta

      @Nullable protected @Nullable org.aya.syntax.core.term.Term solveMeta(@NotNull @NotNull org.aya.syntax.core.term.call.MetaCall meta, @NotNull @NotNull org.aya.syntax.core.term.Term rhs, @Nullable @Nullable org.aya.syntax.core.term.Term type)
    • compare

      public boolean compare(@NotNull @NotNull org.aya.syntax.core.term.Term preLhs, @NotNull @NotNull org.aya.syntax.core.term.Term preRhs, @Nullable @Nullable org.aya.syntax.core.term.Term type)
      Compare two terms with the given (if not null)
      Returns:
      true if they are 'the same' under , false otherwise.
    • putIndex

      @NotNull public @NotNull org.aya.syntax.ref.LocalVar putIndex(@NotNull @NotNull org.aya.syntax.core.term.Term term)
    • getFailure

      @NotNull public @NotNull TermComparator.FailureData getFailure()
    • checkEqn

      @Internal public boolean checkEqn(@NotNull TyckState.Eqn eqn)