feat(optimization): eliminate dead branches using liquid refinements (#114)#463
Open
alcides wants to merge 1 commit into
Open
feat(optimization): eliminate dead branches using liquid refinements (#114)#463alcides wants to merge 1 commit into
alcides wants to merge 1 commit into
Conversation
cursor
Bot
force-pushed
the
fix/liquid-types-optimization-114
branch
2 times, most recently
from
July 11, 2026 03:00
0d28f08 to
e75a276
Compare
cursor
Bot
force-pushed
the
fix/liquid-types-optimization-114
branch
3 times, most recently
from
July 15, 2026 03:03
c9f7118 to
1754c34
Compare
…114) When parameter refinements entail an if-condition, remove the unreachable branch after typechecking and emit a warning. Fix optimize_bindings to preserve mutual-recursion metadata on Rec nodes. Co-authored-by: Cursor <cursoragent@cursor.com>
cursor
Bot
force-pushed
the
fix/liquid-types-optimization-114
branch
from
July 16, 2026 03:01
1754c34 to
743025b
Compare
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.
Summary
ifbranches made unreachable by liquid refinements in scope (closes Liquid Types Optimization #114).optimize_bindingsto preserve allRecmetadata (including mutual-recursion companions) when folding binding bodies.Test plan
pytest tests/refinement_branch_opt_test.pypytest tests/contata_test.py::test_cata_recovers_evaluable_definitions(mutual recursion spine preserved)pytest tests/optimization_test.pyMade with Cursor