Repository navigation
fix(haskell): let func_start/args match same-line where-clause bindings - #1661
Merged
Merged
Conversation
A where-introduced local binding whose first clause is written entirely on one line (`where name args = expr`) was never matched by func_start's equation-anchored alternative -- the same shape #1564 already fixed for `let`, just not yet extended to `where`. Extended the identical optional-skip treatment (`(?:let[ \t]+)?` -> `(?:(?:let|where)[ \t]+)?`) to both func_start and its sibling args rule, mirroring #1564's precedent exactly. found_functions 139 -> 142 (recall up), args_exact_match 129 -> 132 (also up, since the args rule needed the same where-skip or the newly-found functions from func_start would get a wrong 0-arg count instead of simply being absent). Fixes #1615 Co-Authored-By: Claude Sonnet 5 <[email protected]>
squid-protocol
enabled auto-merge (squash)
August 15, 2026 19:29
…e-single-line # Conflicts: # tests/golden_master_audit.json # tests/golden_master_zero_dep_audit.json
Owner
Author
|
Reopening to try to shake loose a CI run -- matches this repo's documented 'push events silently stop creating runs' flake (see gitgalaxy.yml's own comment on this). |
…e-single-line # Conflicts: # tests/golden_master_audit.json # tests/golden_master_zero_dep_audit.json
Contributor
…e-single-line # Conflicts: # tests/golden_master_audit.json # tests/golden_master_zero_dep_audit.json
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
Fixes #1615.
A
where-introduced local binding whose first clause is written entirely onone line (
where name args = expr) was never matched byfunc_start'sequation-anchored alternative -- the same shape #1564 already fixed for
let, just not yet extended towhere.func_start's negative-lookaheadkeyword-exclusion list sees
whereimmediately after^[ \t]+and rejectsthe whole line, with no way to retry past it the way
letnow can.Extended the identical optional-skip treatment #1564 already gave
let(
(?:let[ \t]+)?->(?:(?:let|where)[ \t]+)?) tofunc_start's equation-anchored alternative. While verifying, found the sibling
argsrule (whichgot its own symmetric
let-skip from #1564) needed the identicalwhereextension too -- without it, the newly-found functions from
func_startwould get a wrong 0-arg count instead of simply being absent as before
(measured:
args_exact_matchbriefly regressed 129 -> 128 with only thefunc_startfix; fixingargstoo brought it to 132, net improvement).Verification
crucible_check.py --mode bothshows the expected cascading drift (globalPageRank/spatial-coordinate stats shift slightly corpus-wide when any one
language's function count changes) -- blessed via
--update --yes, re-ranto confirm PASS/PASS.
audit_check.py --ciclean (ruff/mypy/dead-key/ast-accuracy).Type of change
language_standards.py)Differential Scan target
Haskell parser corpus (pandoc) -- the same files the issue's measurements came from.
Co-Authored-By: Claude Sonnet 5 [email protected]