Module-level (doc …) diagnostic omits where doc belongs #13

Open
opened 2026-05-20 13:21:58 +02:00 by Brummel · 0 comments
Owner

A (module NAME (doc "…") (fn …)) is correctly rejected (unknown def head \doc`) but the message lists valid def heads without saying doc strings attach *inside* fn/datadefs; an author can read it and conclude doc strings are unsupported. One-line tidy: append a hint like "(doc strings attach insidefn/data` defs, not at module level)". Low cost; verbose-diagnostic-philosophy gap, not a bug.

context: docs/specs/2026-05-18-fieldtest-loop-recur.md friction.

A `(module NAME (doc "…") (fn …))` is correctly rejected (`unknown def head \`doc\``) but the message lists valid def heads without saying doc strings attach *inside* `fn`/`data` defs; an author can read it and conclude doc strings are unsupported. One-line tidy: append a hint like "(doc strings attach inside `fn`/`data` defs, not at module level)". Low cost; verbose-diagnostic-philosophy gap, not a bug. **context:** `docs/specs/2026-05-18-fieldtest-loop-recur.md` friction.
Sign in to join this conversation.