- Direct Known Subclasses:
PropTycker
This is the fourth base-base class of a tycker.
It has no new members, and supports some unification and cubical boundary functions.
- See Also:
-
MockTycker.unifier(SourcePos, Ordering)unifyTy(Term, Term, SourcePos)unifyReported(Term, Term, Term, Expr, Function)unifyTyReported(org.aya.core.term.Term, org.aya.core.term.Term, org.aya.concrete.Expr)confluence(kala.collection.immutable.ImmutableSeq<org.aya.guest0x0.cubical.Restr.Side<org.aya.core.term.Term>>, org.aya.concrete.Expr, org.aya.core.term.Term)checkBoundaries(org.aya.concrete.Expr, org.aya.core.term.PathTerm, org.aya.core.visitor.Subst, org.aya.core.term.Term)inheritFallbackUnify(org.aya.core.term.Term, org.aya.tyck.Result, org.aya.concrete.Expr)
-
Field Summary
Fields inherited from class org.aya.tyck.tycker.LetListTycker
definitionEqualitiesFields inherited from class org.aya.tyck.tycker.ConcreteAwareTycker
withTermsFields inherited from class org.aya.tyck.tycker.MockTycker
ctxFields inherited from class org.aya.tyck.tycker.StatedTycker
stateFields inherited from class org.aya.tyck.tycker.TracedTycker
reporter, traceBuilder -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUnifiedTycker(@NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder, @NotNull TyckState state) -
Method Summary
Modifier and TypeMethodDescriptionprotected final Result.DefaultcheckBoundaries(Expr expr, PathTerm path, Subst subst, Term lambda) protected final voidconfluence(@NotNull kala.collection.immutable.ImmutableSeq<org.aya.guest0x0.cubical.Restr.Side<Term>> clauses, @NotNull Expr loc, @NotNull Term type) protected final @NotNull Resultprotected final ResultinheritFallbackUnify(@NotNull Term upper, @NotNull Result result, Expr loc) Check ifloweris a subtype ofupper, and try to insert implicit arguments to fulfill this goal (if possible).booleanunifyReported(@NotNull Term lhs, @NotNull Term rhs, @NotNull Term ty, Expr loc, Function<UnifyInfo.Comparison, org.aya.util.reporter.Problem> p) booleanunifyReported(@NotNull Term lhs, @NotNull Term rhs, @NotNull Term ty, @NotNull org.aya.util.error.SourcePos pos, @NotNull LocalCtx ctx, Function<UnifyInfo.Comparison, org.aya.util.reporter.Problem> p) protected final TermComparator.FailureDatabooleanunifyTyReported(@NotNull Term upper, @NotNull Term lower, Expr loc) Check ifloweris a subtype ofupper, and report a type error if it's not the case.booleanunifyTyReported(@NotNull Term upper, @NotNull Term lower, Expr loc, Function<UnifyInfo.Comparison, org.aya.util.reporter.Problem> p) Methods inherited from class org.aya.tyck.tycker.LetListTycker
subscopedMethods inherited from class org.aya.tyck.tycker.ConcreteAwareTycker
addWithTerm, addWithTerm, solveMetas, traced, traceExit, zonk, zonk, zonkMethods inherited from class org.aya.tyck.tycker.MockTycker
generatePi, instImplicits, mockArg, mockTerm, synthesizer, unifierMethods inherited from class org.aya.tyck.tycker.StatedTycker
compareRestr, conOwnerSubst, defCall, inferRef, unifier, whnf
-
Constructor Details
-
UnifiedTycker
protected UnifiedTycker(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder traceBuilder, @NotNull @NotNull TyckState state)
-
-
Method Details
-
unifyTyReported
public boolean unifyTyReported(@NotNull @NotNull Term upper, @NotNull @NotNull Term lower, Expr loc) Check ifloweris a subtype ofupper, and report a type error if it's not the case.- Returns:
- true if well-typed.
- See Also:
-
unifyTyReported
public boolean unifyTyReported(@NotNull @NotNull Term upper, @NotNull @NotNull Term lower, Expr loc, Function<UnifyInfo.Comparison, org.aya.util.reporter.Problem> p) - Parameters:
upper- Expected typelower- Actual typeloc- The location of the expressionp- Callback to generate the error message- Returns:
- true if unified successfully, false otherwise
-
inheritFallbackUnify
protected final Result inheritFallbackUnify(@NotNull @NotNull Term upper, @NotNull @NotNull Result result, Expr loc) Check ifloweris a subtype ofupper, and try to insert implicit arguments to fulfill this goal (if possible).- Returns:
- the term and type after insertion
- See Also:
-
error
-
unifyReported
public boolean unifyReported(@NotNull @NotNull Term lhs, @NotNull @NotNull Term rhs, @NotNull @NotNull Term ty, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull LocalCtx ctx, Function<UnifyInfo.Comparison, org.aya.util.reporter.Problem> p) - Parameters:
p- Callback to generate the error message- Returns:
- true if unified successfully, false otherwise
-
unifyReported
-
confluence
-
checkBoundaries
-
unifyTy
protected final TermComparator.FailureData unifyTy(@NotNull @NotNull Term upper, @NotNull @NotNull Term lower, @NotNull @NotNull org.aya.util.error.SourcePos pos) - Returns:
- null if unified successfully, otherwise a frozen data
-