Repository navigation
Conversation
When several declarations survived for a call, each became a branch with its own guards and call, so a call that more than one declaration accepted ran its body once per declaration, duplicating answers and effects. Now the first declaration whose guards accept the arguments runs the call, and a result is kept if that declaration, or a later declaration accepting the arguments, accepts it; when arguments or results are still open, only the overloads that accept the post-call tuple attach residual constraints. A call no declaration accepts still raises no_matching_overload. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When several declarations survive a call, main emits a guarded body call for each one. This repeats answers and side effects. Dispatch now runs the body once for the argument values and retains each result accepted by a compatible declaration.
Open values carry disjunctive requirements before the body runs; output checks refine the surviving alternatives afterward. Requirements follow aliases and newly exposed subterms. An overload that rejects the result leaves no unrelated input constraint behind.
Equivalent final input-only obligations can be reused on the same actual variables. Caller-owned type variables remain rigid. The translator identifies its fresh declaration variables so their renaming can be ignored when comparing input-only requirements. Pending output states keep separate identities. Comparison copies do not alter the live values or their obligations.
Validation on upstream main
ee5cacbplus this change:Both full suites retain the existing
tilepuzzle --oracletimeout skip. Targeted SWI-Ochecks pass but retain main's existing builtin-registry startup diagnostic (also addressed by #298). Normal-mode full suites are the primary validation here. Type checking still has runtime and memory costs; no universal speedup is claimed.Fixes #312. Companion stable change: #313.