Repository navigation
Description
What
Found while broadening haskell's func_start recall in #1266 (PR #1307). Haskell's func_start
matches any top-level name :: <type> signature line, then (via the routing fix in #1307) walks
through the defining equation(s) below it. This correctly matches real point-free functions
(htmlFormat :: Text -> Bool / htmlFormat = (\elem` [...])), but ALSO matches plain point-free VALUE bindings whose type has no arrow at all -- i.e. genuine constants, not functions (defaultKaTeXURL :: Text/defaultKaTeXURL = "https://..."`).
Tree-sitter's ground truth (real corpus: language-crucible/data/haskell/pandoc) correctly
excludes plain value bindings from its function-node count. GitGalaxy's func_start currently
can't tell the two apart -- both are name :: type followed by name = expr, differing only in
whether type itself contains ->.
Evidence
tests/tree_sitter_accuracy_baseline_haskell.json: extra_functions rose from 2 (pre-#1266) to
32 (post-#1266) as recall rose from 4.3% to 55.3%. Every sampled "extra" name checked during
#1266's investigation was this exact shape -- confirmed for defaultKaTeXURL, defaultAbbrevs,
camelCaseToHyphenated, blocksToInlines', applyJSONFilter, all real Haskell corpus lines with
no -> anywhere in their signature.
Suggested fix shape
Extend func_start's match (or a post-hoc check in _slice_by_indentation, which already has
access to the matched name for the haskell continuation-clause check added in #1307) to
require an eventual -> between the :: and the end of the type signature (before the equation
begins) before accepting the match as a real function. The signature can wrap onto multiple
physical lines, so this needs a genuinely bounded scan (not an unbounded lookahead) -- possibly
reusing the existing continuation-clause detection (_slice_by_indentation already knows where
the equation starts) to bound the signature-only span before checking for -> within it.
Deliberately NOT attempted in #1266/#1307 -- flagged there as a scoped follow-up rather than
rushed under time pressure, since a bounded multi-line signature scan is easy to get subtly
wrong (ReDoS or false-negative risk) and deserves its own careful pass with verify_candidates.py.
Activity
chore(haskell): regenerate ruff baseline for line-shifted findings
chore(kotlin): re-bless golden master + ruff baseline after merging o…
fix(kotlin): recognize expression-bodied and bodyless func_start bodi…
fix(haskell): reject point-free value bindings in func_start (squid-p…
docs(skills): add tree-sitter-accuracy-sweep skill
fix(haskell): detect equation-form func_start without a `::` signature (
fix(haskell): detect equation-form func_start without a `::` signature (
fix(testing): haskell ground truth now recognizes point-free functions (
Validate haskell ctags-alone-existence ledger entry
Fix haskell clause-splitting in tri-comparison's tree-sitter walk (#1865
Tri-comparison chart: drop recall/args ratios for unranked found-coun…
Resolve all 6 rust tri-comparison ledger shapes (#1873)
fix(haskell): retain arrowless IO-action entry points in the #1312 gu…