You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CORE-03. The type/effect grammar had no module-qualified path
production: `Externs.Res` / `Externs::Res` were unrepresentable in any
type or effect position and failed with `parse error` at the `.`. An
estate audit found this the single dominant fault — 525 of ~1177 .affine
files fail to parse, qualified-path the leading cause. ADR-011 already
settled real modules + qualified paths; the consequence was simply
unspeakable.
Decision (ADR-014, owner-settled): accept BOTH `.` and `::` (mixed
permitted); `Pkg::Type` is canonical; `.` normalised to `::`.
Grammar (lib/parser.mly):
- New `qualified_type_name`: >=2 `upper_ident` segments, right-recursive,
`qsep = DOT | COLONCOLON`, folded to a single canonical `::`-joined
ident string.
- Added to `type_expr_primary` (TyCon + TyApp via `[ ]` and `< >`) and
`effect_term` (EffVar + EffCon).
- Folding to one ident means resolve/typecheck/all codegens are
unchanged, and the formatter prints the `::` canonical form for free
(`.`→`::` normalisation with zero formatter change).
Conflict-neutral by construction — it only adds DOT/COLONCOLON lookahead
after a type/effect-position `upper_ident`, where no reduce action
previously existed (that void IS the `parse error at .`). Measured:
Menhir conflict states unchanged at 21 S/R + 1 R/R; item counts
unchanged at 68 S/R / 7 R/R. Zero delta.
ADR recorded per the ADR-011/012 convention:
- .machine_readable/6a2/META.a2ml [[adr]] ADR-014
- docs/specs/SETTLED-DECISIONS.adoc (== ADR-014 section)
Tests (test/test_e2e.ml, "E2E Qualified Paths #228", parse-only — the
#228 fault is a parse error; resolving a qualified name against a real
module is a separate concern): qualified type in param (./::), struct
field, type application [ ]/< >, deep + mixed-separator paths, qualified
effect (./::), and a guard that bare unqualified forms are unaffected.
Gate: opam exec --switch=. -- dune runtest --force = 267/267 (was 260;
+7), zero regression. Refs #228 (not Closes — language-side, owner-gated;
estate re-audit + ReScript-residue #229 follow separately).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments