java.lang.Object
org.aya.tyck.unify.TermComparator
org.aya.tyck.unify.Unifier
This class implements pattern unification with delayed constraints solving.
It is extracted from
TermComparator for modularity and readability.- See Also:
- Implementation Note:
- in case
TermComparator.compareUntyped(Term, Term, Sub, Sub)returns null, we will consider it a unification failure, so be careful when returning null.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aya.tyck.unify.TermComparator
TermComparator.FailureData, TermComparator.Sub -
Field Summary
Fields inherited from class org.aya.tyck.unify.TermComparator
cmp, ctx, pos, reporter, state, traceBuilder -
Constructor Summary
ConstructorsConstructorDescriptionUnifier(@NotNull org.aya.util.Ordering cmp, @NotNull org.aya.util.reporter.Reporter reporter, boolean allowVague, boolean allowConfused, Trace.Builder traceBuilder, @NotNull TyckState state, @NotNull org.aya.util.error.SourcePos pos, @NotNull LocalCtx ctx) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckEqn(TyckState.Eqn eqn) protected @Nullable TermsolveMeta(@NotNull Term preRhs, TermComparator.Sub lr, TermComparator.Sub rl, @NotNull MetaTerm lhs) Methods inherited from class org.aya.tyck.unify.TermComparator
compare, compare, compareSort, compareUntyped, getFailure, tracing, withIntervals
-
Constructor Details
-
Unifier
public Unifier(@NotNull @NotNull org.aya.util.Ordering cmp, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, boolean allowVague, boolean allowConfused, @Nullable Trace.Builder traceBuilder, @NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.util.error.SourcePos pos, @NotNull @NotNull LocalCtx ctx)
-
-
Method Details
-
solveMeta
@Nullable protected @Nullable Term solveMeta(@NotNull @NotNull Term preRhs, TermComparator.Sub lr, TermComparator.Sub rl, @NotNull @NotNull MetaTerm lhs) - Specified by:
solveMetain classTermComparator
-
checkEqn
-