Module aya.base

Interface Unifiable

All Superinterfaces:
Problematic, Stateful
All Known Implementing Classes:
ExprTycker

public interface Unifiable extends Problematic, Stateful
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    checkBoundaries(org.aya.syntax.core.term.xtt.EqTerm eq, org.aya.syntax.core.Closure core, @NotNull org.aya.util.error.SourcePos pos, @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> report)
     
    unifier(@NotNull org.aya.util.error.SourcePos pos, @NotNull org.aya.util.Ordering order)
     
    unifyTerm(@NotNull org.aya.syntax.core.term.Term upper, @NotNull org.aya.syntax.core.term.Term lower, @Nullable org.aya.syntax.core.term.Term type, @NotNull org.aya.util.error.SourcePos pos, org.aya.util.Ordering ord)
    Check whether is a subtype of if is Ordering.Lt.
    default boolean
    unifyTermReported(@NotNull org.aya.syntax.core.term.Term lhs, @NotNull org.aya.syntax.core.term.Term rhs, @Nullable org.aya.syntax.core.term.Term type, @NotNull org.aya.util.error.SourcePos pos, @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> pc)
     
    default boolean
    unifyTyReported(@NotNull org.aya.syntax.core.term.Term upper, @NotNull org.aya.syntax.core.term.Term lower, @NotNull org.aya.util.error.SourcePos pos, @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> pc)
     
    default boolean
    unifyTyReported(@NotNull org.aya.syntax.core.term.Term upper, @NotNull org.aya.syntax.core.term.Term lower, @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr)
     

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

    fail, fail, fail, reporter

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

    freezeHoles, solve, state, whnf
  • Method Details

    • unifier

      @NotNull @NotNull TermComparator unifier(@NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull org.aya.util.Ordering order)
    • unifyTerm

      @Nullable default TermComparator.FailureData unifyTerm(@NotNull @NotNull org.aya.syntax.core.term.Term upper, @NotNull @NotNull org.aya.syntax.core.term.Term lower, @Nullable @Nullable org.aya.syntax.core.term.Term type, @NotNull @NotNull org.aya.util.error.SourcePos pos, org.aya.util.Ordering ord)
      Check whether is a subtype of if is Ordering.Lt.
      Parameters:
      ord - by default should be Ordering.Lt, or Ordering.Eq
      Returns:
      failure data, null if success
    • unifyTyReported

      default boolean unifyTyReported(@NotNull @NotNull org.aya.syntax.core.term.Term upper, @NotNull @NotNull org.aya.syntax.core.term.Term lower, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> pc)
      Parameters:
      pc - a problem constructor
      See Also:
    • checkBoundaries

      default void checkBoundaries(org.aya.syntax.core.term.xtt.EqTerm eq, org.aya.syntax.core.Closure core, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> report)
    • unifyTermReported

      default boolean unifyTermReported(@NotNull @NotNull org.aya.syntax.core.term.Term lhs, @NotNull @NotNull org.aya.syntax.core.term.Term rhs, @Nullable @Nullable org.aya.syntax.core.term.Term type, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull Function<UnifyInfo.Comparison,org.aya.util.reporter.Problem> pc)
    • unifyTyReported

      default boolean unifyTyReported(@NotNull @NotNull org.aya.syntax.core.term.Term upper, @NotNull @NotNull org.aya.syntax.core.term.Term lower, @NotNull @NotNull org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr> expr)