Skip to content

Haskell calls_out: f $ x application heads; definition left sides are not calls (Part of #6454) - #6504

Merged
squid-protocol merged 6 commits into
mainfrom
churn/6454-20261024T1638Z
Oct 24, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
churn/6454-20261024T1638Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6454. Stacked on #6499 (Haskell juxtaposition calls_out, open): this branch contains #6499's commits, so merge #6499 first; the diff then shrinks to this slice (haskell.py, one test file, one contract row, baseline/ledger/goldens).

What changed

Class: Haskell calls_out head recognition for infix $ application, and definition left sides read as calls.

  • f $ x, f $! x, withObject "k" $ \m -> ...: a head followed by an infix $ (whitespace on both sides) is an application. $(splice), ($ x), (f $) are not. A bare string is deliberately NOT an argument start: the literal shield turns a backtick operator (s `elem` ys) into the same "" as a string, so only "..." $ counts.
  • The left side of a definition (f (Foo a) = ..., let g (x, y) = ..., where h x = ...) is masked via _calls_out_masked_blocks: the old name ( alternative read those binders as calls. A ==/<= before the =, a record brace, $, a lambda or <- means an expression line, nothing masked.

Pandoc (call_graph_accuracy, level 1)

P R TP FP FN
#6499 65.5 78.4 262 138 72
this 69.4 85.0 284 125 50

fn:infix/- 16 -> 3 (the remaining 3 sit past a #ifdef that cuts the function span, not a $ problem); infix/-+generic 8 -> 0; function<local_binds patterns shrink. Other languages unchanged (baseline and ledger edited for haskell only; powershell drift in a full regenerate comes from main, not this PR).

Golden drift

Haskell Calls Out To rows only, plus PageRank rounding moves in other languages' rows that follow from the haskell edge changes (both legs blessed via golden-lock.sh crucible_check.py --update --yes).

Checklist

Checklist: partial [c:e595dbf8] -- apply/qualified residue (E.throwIO e, T.singleton x), calls past a #ifdef span cut, and where-bound bodies attributed to the parent function remain
Checklist: partial [c:39d03c20] -- apply/constructor 2 left (OptDestination outputFile inside a list literal, Format "markdown" string arg)

Class sweep

Class: Haskell application-head recognition. Sibling gaps: backtick-infix heads, qualified heads (T.unsnoc), bare-string arguments (blocked by the shield conflating backticks and strings), #ifdef/CPP function-span cuts, point-free bodies (ts outside-ts-function 64) and where/let bodies attributed to the parent (ts inner-named-function 52): reference-attribution differences, not rule bugs.

Lessons for agents

  • The literal shield rewrites a Haskell backtick operator to "" exactly like a string: a rule that treats " as an argument start captures s `op` ys.
  • tri_comparison_chart.py --ci has no haskell baseline; it dirties tri_comparison_ledger.json, restore it.
  • call_graph_accuracy.py --regenerate after merging main rewrites other languages' rows: keep only the haskell block.

🤖 Generated with Claude Code

squid-protocol and others added 6 commits October 24, 2026 12:25
…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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 17:00
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6504 @ 69dbf0c: 1 failed check(s)

== rosetta-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40114158515/job/120931890144
repro: no local equivalent; read the check page
errors:
REG haskell FAIL haskell: 8 mismatch(es)
pre shell FAIL shell: 6 mismatch(es)
##[error]haskell: this build moves the control corpus -- FAIL haskell: 8 mismatch(es)
##[error]Process completed with exit code 1.
log tail:
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/3f1a7483-23d3-4401-9d36-888560eca6b7' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy-baseline
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/8f65c9bd-8cf9-4878-9ad2-7fb28f86af1f' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant