java.lang.Object
org.aya.tyck.Tycker
org.aya.tyck.ExprTycker
- API Note:
- make sure to instantiate this class once for each
Decl.TopLevel. Do not use multiple instances in the tycking of oneDecl.TopLeveland do not reuse instances of this class in the tycking of multipleDecl.TopLevels.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final recordstatic final recordExprTycker.TermResult.typeis the type ofExprTycker.TermResult.wellTyped.static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean@NotNull TypedSubsta `let` sequence, consider we are tycking inlet ... in HERE@NotNull LocalCtxfinal AyaShape.Factoryfinal @NotNull kala.collection.mutable.MutableTreeSet<Expr.WithTerm>Fields inherited from class org.aya.tyck.Tycker
reporter, state, traceBuilder -
Constructor Summary
ConstructorsConstructorDescriptionExprTycker(PrimDef.Factory primFactory, AyaShape.Factory shapeFactory, @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWithTerm(Expr.Param param, @NotNull Term type) voidaddWithTerm(Expr.WithTerm withTerm, @NotNull ExprTycker.Result result) @NotNull ExprTycker.Result@NotNull org.aya.guest0x0.cubical.Partial<Term>elaboratePartial(Expr.PartEl partial, @NotNull Term type) @NotNull ExprTycker.ResultbooleanisPropType(@NotNull Term type) @NotNull org.aya.guest0x0.cubical.Restr<Term>void@NotNull SortTermstatic @NotNull SortTerm<R> R@NotNull ExprTycker.Resultsynthesize(@NotNull Expr expr) @NotNull ExprTycker.TyResult@NotNull Unifierunifier(@NotNull org.aya.util.error.SourcePos pos, @NotNull org.aya.util.Ordering ord) voidunifyTyReported(@NotNull Term upper, @NotNull Term lower, Expr loc) Check ifloweris a subtype ofupper, and report a type error if it's not the case.<T> TwithInProp(boolean inProp, @NotNull Supplier<T> supplier) <T> TwithResult(@NotNull Term result, @NotNull Supplier<T> supplier) <T> TwithSubSubst(Supplier<T> supplier) @NotNull ExprTycker.Resultzonk(@NotNull ExprTycker.Result result)
-
Field Details
-
localCtx
-
lets
a `let` sequence, consider we are tycking inlet ... in HERE -
shapeFactory
-
withTerms
-
inProp
public boolean inProp
-
-
Constructor Details
-
ExprTycker
public ExprTycker(@NotNull PrimDef.Factory primFactory, @NotNull AyaShape.Factory shapeFactory, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder)
-
-
Method Details
-
solveMetas
public void solveMetas()- Overrides:
solveMetasin classTycker
-
withInProp
-
withSubSubst
-
withResult
-
restr
-
elaboratePartial
@NotNull public @NotNull org.aya.guest0x0.cubical.Partial<Term> elaboratePartial(@NotNull Expr.PartEl partial, @NotNull @NotNull Term type) -
sort
-
addWithTerm
public void addWithTerm(@NotNull Expr.WithTerm withTerm, @NotNull @NotNull ExprTycker.Result result) -
addWithTerm
-
inherit
@NotNull public @NotNull ExprTycker.Result inherit(@NotNull @NotNull Expr expr, @NotNull @NotNull Term type) -
synthesize
-
ty
-
sortPi
-
sortPi
@NotNull public static @NotNull SortTerm sortPi(@NotNull @NotNull SortTerm domain, @NotNull @NotNull SortTerm codomain) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
zonk
-
unifier
@NotNull public @NotNull Unifier unifier(@NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull org.aya.util.Ordering ord) -
unifyTyReported
Check ifloweris a subtype ofupper, 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
-
subscoped
-