Repository navigation
Haskell calls_out: juxtaposition and constructor application (Part of #6454) - #6499
squid-protocol wants to merge 4 commits into
Conversation
…6454) The haskell rule now captures heads of `f x`, `f (g x)` and `Just x` by position (after an operator, bracket, do/then/case, or at a body line start) plus an argument-start token; type signatures are masked, return/try/catch/finally are calls, and pattern lines bind rather than call. pandoc: P 44.2 -> 65.5, R 30.8 -> 78.4. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…6454) Only the haskell/pandoc group of calls_out_to moves, plus the fan_in/fan_out/pagerank and graph snapshots derived from it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #6499 @ de1cd61: 2 failed check(s) == crucible-audit (full-precision) (failure) -- real == crucible-audit (zero-dependency) (failure) -- real |
Merging origin/main (the cpp and powershell call-graph and class_start changes) moves PageRank values in the 5th decimal across php/rust/etc; only pagerank.json changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #6499 @ 76b217f: 1 failed check(s) == rosetta-audit (failure) -- real |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
Closing as superseded by #6504 (merged 2026-10-24 as d4d136d). That PR was stacked on this branch and was squash-merged into main with all of this PR's commits in it: Still owed (from this PR's Cross-repo note, now owed by main): a keyword-rosetta PR against engine main that re-blesses the haskell expected |
Pull request was closed
Part of #6454 (Haskell slice after the Dart slice, #6473).
What changed
Haskell calls have no parentheses, so the
calls_outrule now also recognises juxtaposition application (f x y,f (g x); tree-sitterapply/variable,apply/apply) and constructor application (Just x;apply/constructor, contract C3). A head counts when it follows an operator, bracket,do/then/else/in/case, or starts a body line, and an argument-start token follows it. The rule now has two groups (paren-call name, juxtaposition head); the detector already takes the first non-empty group.haskell.py: new rule;_calls_out_masked_blocksblanks type signatures (and continuation lines); the pattern guard (Left e -> ...,f (Foo a) = ...) stops patterns reading as calls; the head is anchored with a prime-aware lookbehind rather than\b(a longa'b'b'...identifier was quadratic, found by the ReDoS test).detector.py:return,try,catch,finallyare exempt from the global keyword ignore for haskell (they are ordinary functions).test_calls_out_haskell_juxtaposition_6454.py;test_haskell_strict.py::test_haskell_calls_outupdated for two groups.docs/calls_out_rule_contract.mdhaskell row;call_graph_accuracy_baseline.jsonregenerated;graph_comparison_ledger.jsonspliced forhaskell/entries only (timestamps unchanged elsewhere) to keep the overlap with Import graph: Swift rule (C7) and swift-argument-parser corpus entry (Part of #3798) #6486 small.Measurement (call_graph_accuracy, haskell/pandoc, 142 functions)
Precision 44.2% -> 65.5%, recall 30.8% -> 78.4% (TP 103 -> 262, FP 138, FN 231 -> 72).
Golden drift
Only the
haskell/pandocgroup ofcalls_out_tomoves (checked by key diff on both fixtures), plus the fan_in/fan_out/pagerank/graph/llm_brief values derived from it. Blessed viagolden-lock.sh crucible_check.py --update --yes.Gates
pr_gates --fast7/7,--ratchets9/9,audit_check.pyclear,tree_sitter_accuracy_audit --lang haskell --ciOK,tri_comparison_chart --all --ciOK,call_graph_accuracy --ciOK, pinned ruff 0.17.1 format clean, new test passes under plainpytestfrom/tmp.Class / Sibling gaps
Class: positional-application call heads in languages with no call parentheses (Haskell here). Fixed:
apply/variable,apply/apply,apply/constructorshapes.Sibling gaps (none needed by a burned estate):
infix/-andinfix/-+generic:f $ x,E.throwIO $ Xheads (16 FN on pandoc).letandwherestill count as callees (outside-ts-function64,inner-named-function50 FP); a separate defect.apply/qualifiedresidue (T.singleton '\n',BL.writeFile f x), guard-line heads (| null (f x)), heads after,in lists.call_graph_accuracy_baseline.jsonalso moved for dart (recall 95.0 -> 99.0) because Dart calls_out: generic invocations f<T>(x) and nullable type arguments (Part of #6454) #6473 did not refresh it; included since--regeneraterewrites the file. The dart/C ledger entries were left alone.Cross-repo
keyword-rosetta (haskell control folder): this change makes
calls_out_tofind real calls in the planted probes (probeIo->readFile,probeRisk->die,probeTest->hspec,probeSafety->fromMaybe,probeState->modifyIORef,probeBypass->fromJust,probeTelemetry->logInfo,probeCleanup->hClose); the manifest still expects[], sorosetta-auditreports 8 haskell mismatches. They are correct under contract C2 (built-ins are calls). Merge order: this engine PR first (labelledrosetta:rebless-owedperdocs/self_scan/ROSETTA_AUDIT.md; the audit's only regression is these 8 haskell probes, shell is pre-existing drift), then a keyword-rosetta PR against engine main re-blessing the haskell expectedcalls_out_tofordata/haskell/{main,a,b,c}.hs(companion: to be opened after this merges, since itsverify.ymlchecks out engine main). Re-run keyword-rosettaverify.ymlafter; nothing to re-run here.Checklist
Checklist: partial [c:e595dbf8] --
infix/-(f $ x) heads,apply/qualifiedresidue (T.singleton), guard-line and list-element heads (next: #6504)Checklist: partial [c:39d03c20] -- constructor heads behind
$and qualified constructors (next: #6504)Lessons for agents
\bbefore an identifier that may contain'is quadratic ona'b'b'...: anchor with(?<![ID_CONTINUE'])instead.call_graph_accuracy.py --ledgerrewrites every entry'slast_reconciled_atand any other language's drift; splice only the language's entries to keep the diff small."", so an infixa \div` blooks likea "" b` to a rule.🤖 Generated with Claude Code