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
ReScript module Name { … }block modules have only a partial
AffineScript target. AffineScript is strictly one module per file
(grammar parser.mly:130-134: a single optional module Path; header, before imports; no block-module form — module A { } parse-errors).
Single block-module per file (<comments> ; use…; ; module P { body })
→ mechanical clean target: hoist module P; header to the top, drop
the wrapping braces, dedent the body, keep use after the header. This is in the canonical map (RESCRIPT-ELIMINATION.adoc, structural
Tier-1) and verified to parse.
Escalated language-side rather than guessed per-repo — the same
bidirectional-evidence discipline as ESC-01..03 / #228.
Decision needed
One of:
Doctrine: split per file. Each module X { } becomes its own X.affine with a module …; header (mechanical once the split
convention + loader path mapping is fixed — see the cross-module
resolution note below).
Add a block/nested-module form to the grammar (ADR), if
multi-module-per-file is a wanted AffineScript feature.
Related (not this issue, but adjacent)
Even single-block-module files that port cleanly parse then hit Resolve.UndefinedModule because the repo's module-path↔file-layout
(e.g. idaptik-dlc-vm/src/State.affine declaring module Vm.State;)
does not match the module loader's resolution. That is cross-module
graph coherence (INT-02 loader-bridge territory), explicitly out of #229's per-file contract — tracked in RESCRIPT-ELIMINATION.adoc Tier-4,
not here.
Problem
ReScript
module Name { … }block modules have only a partialAffineScript target. AffineScript is strictly one module per file
(grammar
parser.mly:130-134: a single optionalmodule Path;header,before imports; no block-module form —
module A { }parse-errors).<comments> ; use…; ; module P { body })→ mechanical clean target: hoist
module P;header to the top, dropthe wrapping braces, dedent the body, keep
useafter the header.This is in the canonical map (RESCRIPT-ELIMINATION.adoc, structural
Tier-1) and verified to parse.
standards/lol/src/cyc/OpenCyc.affine:module Config { } module Concepts { } module Types { } …) has no clean target: it cannotcollapse to one file-header without a semantic re-design (split into N
files, or a namespacing decision). 14 estate occurrences across
block-module-bearing files (post-LANG: type/effect grammar has no module-qualified path —
Pkg.Type/Pkg.Effectunrepresentable (estate-wide port blocker; ADR-014) #228 re-audit;tools/estate-rs-audit/).Escalated language-side rather than guessed per-repo — the same
bidirectional-evidence discipline as ESC-01..03 / #228.
Decision needed
One of:
module X { }becomes its ownX.affinewith amodule …;header (mechanical once the splitconvention + loader path mapping is fixed — see the cross-module
resolution note below).
multi-module-per-file is a wanted AffineScript feature.
Related (not this issue, but adjacent)
Even single-block-module files that port cleanly parse then hit
Resolve.UndefinedModulebecause the repo's module-path↔file-layout(e.g.
idaptik-dlc-vm/src/State.affinedeclaringmodule Vm.State;)does not match the module loader's resolution. That is cross-module
graph coherence (INT-02 loader-bridge territory), explicitly out of
#229's per-file contract — tracked in RESCRIPT-ELIMINATION.adoc Tier-4,
not here.
Context
idaptik-dlc-vm28,standards/lol, parts ofburble).tools/estate-rs-audit/.