Context
RFC 0028 (we-data-ch/typr#28, tracking we-data-ch/typr#29) was implemented in we-data-ch/typr#30: an untyped R function (function(a, b) { ... }) is now callable — arity is checked, argument types are not, and the result is typed Any. Preloaded untyped base-R builtins (Position, t, Reduce, …) are callable with any number of arguments too.
The RFC's own checklist calls for two doc-site updates that are out of scope for the compiler repo:
Concrete spots to update (checked against current main)
syntaxe.md:479 (§12 "Échappatoires vers du code brut") says "function(...) / R { ... } / JS { ... } n'ont aucune vérification du tout" — no longer accurate for function(...): it now gets an arity check. Needs a sentence distinguishing it from R { ... } / JS { ... } (still fully unchecked).
docs/philosophy/intro.md:29-38 — the exact motivating example from the RFC (my_addition(num1, num2) on an untyped function(a, b)), currently marked ```typr noplayground because it didn't compile. It should now compile; remove the noplayground marker and verify with npm run check:examples (per this repo's CLAUDE.md, blocks are compiled against the real typr binary in CI).
docs/reference/escape-hatches.md:27 — "Any function(...) expression is captured as an untyped R function — no type checking on the body." True for the body, but should now also say the call itself is arity-checked and typed Any (with an as! example, mirroring the RFC's Guide-level explanation).
docs/reference/escape-hatches.md:82 — the escape-hatch summary table's function(...) row (currently | function(...) | no | Untyped R functions |) should reflect that it's callable now.
Note on typR/typr's CLAUDE.md claim
typR/typr's CLAUDE.md says syntaxe.md is "mirrored in typR/typr/syntaxe.md" — that file doesn't currently exist in the compiler repo (only here, at the doc site's root). Worth a look while doing this: either the compiler-repo copy needs to be (re)created, or that CLAUDE.md line is stale and should be corrected.
Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
Context
RFC 0028 (we-data-ch/typr#28, tracking we-data-ch/typr#29) was implemented in we-data-ch/typr#30: an untyped R function (
function(a, b) { ... }) is now callable — arity is checked, argument types are not, and the result is typedAny. Preloaded untyped base-R builtins (Position,t,Reduce, …) are callable with any number of arguments too.The RFC's own checklist calls for two doc-site updates that are out of scope for the compiler repo:
syntaxe.md§12 updateddocs/philosophy/intro.mdanddocs/reference/escape-hatches.mdupdated; thenoplaygroundmarker removed from the philosophy exampleConcrete spots to update (checked against current
main)syntaxe.md:479(§12 "Échappatoires vers du code brut") says "function(...)/R { ... }/JS { ... }n'ont aucune vérification du tout" — no longer accurate forfunction(...): it now gets an arity check. Needs a sentence distinguishing it fromR { ... }/JS { ... }(still fully unchecked).docs/philosophy/intro.md:29-38— the exact motivating example from the RFC (my_addition(num1, num2)on an untypedfunction(a, b)), currently marked```typr noplaygroundbecause it didn't compile. It should now compile; remove thenoplaygroundmarker and verify withnpm run check:examples(per this repo's CLAUDE.md, blocks are compiled against the realtyprbinary in CI).docs/reference/escape-hatches.md:27— "Anyfunction(...)expression is captured as an untyped R function — no type checking on the body." True for the body, but should now also say the call itself is arity-checked and typedAny(with anas!example, mirroring the RFC's Guide-level explanation).docs/reference/escape-hatches.md:82— the escape-hatch summary table'sfunction(...)row (currently| function(...) | no | Untyped R functions |) should reflect that it's callable now.Note on
typR/typr's CLAUDE.md claimtypR/typr's CLAUDE.md sayssyntaxe.mdis "mirrored intypR/typr/syntaxe.md" — that file doesn't currently exist in the compiler repo (only here, at the doc site's root). Worth a look while doing this: either the compiler-repo copy needs to be (re)created, or that CLAUDE.md line is stale and should be corrected.Test plan
npm run check:examplespasses with the philosophy block'snoplaygroundremovednpm run build(CI'sexamplesjob) greenImplemented in:filled in onrfcs/0028-calling-untyped-r-functions.mdonce this lands in the same release🤖 Generated with Claude Code
https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN