Module aya.base
Package org.aya.tyck

Class ExprTycker

java.lang.Object
org.aya.tyck.Tycker
org.aya.tyck.ExprTycker

public final class ExprTycker extends Tycker
API Note:
make sure to instantiate this class once for each Decl.TopLevel. Do not use multiple instances in the tycking of one Decl.TopLevel and do not reuse instances of this class in the tycking of multiple Decl.TopLevels.
  • Field Details

    • localCtx

      @NotNull public @NotNull LocalCtx localCtx
    • lets

      @NotNull public @NotNull TypedSubst lets
      a `let` sequence, consider we are tycking in let ... in HERE
    • shapeFactory

      @NotNull public final AyaShape.Factory shapeFactory
    • withTerms

      @NotNull public final @NotNull kala.collection.mutable.MutableTreeSet<Expr.WithTerm> withTerms
    • inProp

      public boolean inProp
  • Constructor Details

  • Method Details

    • solveMetas

      public void solveMetas()
      Overrides:
      solveMetas in class Tycker
    • withInProp

      public <T> T withInProp(boolean inProp, @NotNull @NotNull Supplier<T> supplier)
    • withSubSubst

      public <T> T withSubSubst(Supplier<T> supplier)
    • withResult

      public <T> T withResult(@NotNull @NotNull Term result, @NotNull @NotNull Supplier<T> supplier)
    • restr

      @NotNull public @NotNull org.aya.guest0x0.cubical.Restr<Term> restr(@NotNull @NotNull org.aya.guest0x0.cubical.Restr<Expr> restr)
    • elaboratePartial

      @NotNull public @NotNull org.aya.guest0x0.cubical.Partial<Term> elaboratePartial(@NotNull Expr.PartEl partial, @NotNull @NotNull Term type)
    • sort

      @NotNull public ExprTycker.SortResult sort(@NotNull @NotNull Expr expr)
    • addWithTerm

      public void addWithTerm(@NotNull Expr.WithTerm withTerm, @NotNull @NotNull ExprTycker.Result result)
    • addWithTerm

      public void addWithTerm(@NotNull Expr.Param param, @NotNull @NotNull Term type)
    • inherit

      @NotNull public @NotNull ExprTycker.Result inherit(@NotNull @NotNull Expr expr, @NotNull @NotNull Term type)
    • synthesize

      @NotNull public @NotNull ExprTycker.Result synthesize(@NotNull @NotNull Expr expr)
    • ty

      @NotNull public @NotNull ExprTycker.TyResult ty(@NotNull @NotNull Expr expr)
    • sortPi

      @NotNull public @NotNull SortTerm sortPi(@NotNull @NotNull Expr expr, @NotNull @NotNull SortTerm domain, @NotNull @NotNull SortTerm codomain)
    • sortPi

      @NotNull public static @NotNull SortTerm sortPi(@NotNull @NotNull SortTerm domain, @NotNull @NotNull SortTerm codomain) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • zonk

      @NotNull public @NotNull ExprTycker.Result zonk(@NotNull @NotNull ExprTycker.Result result)
    • unifier

      @NotNull public @NotNull Unifier unifier(@NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull org.aya.util.Ordering ord)
    • unifyTyReported

      public void unifyTyReported(@NotNull @NotNull Term upper, @NotNull @NotNull Term lower, Expr loc)
      Check if lower is a subtype of upper, and report a type error if it's not the case.
      See Also:
      • inheritFallbackUnify(Term, Result, Expr)
    • check

      @NotNull public @NotNull ExprTycker.Result check(@NotNull @NotNull Expr expr, @NotNull @NotNull Term type)
    • isPropType

      public boolean isPropType(@NotNull @NotNull Term type)
    • subscoped

      public <R> R subscoped(@NotNull @NotNull Supplier<R> action)