-
-
Notifications
You must be signed in to change notification settings - Fork 0
ESC-04: ReScript block-module — multi-module-per-file has no clean target (Refs 229) #262
Copy link
Copy link
Open
Labels
enhancementNew capability or improvement to existing behaviourNew capability or improvement to existing behaviourfeeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes thereFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes therepriority:p1High - schedule nextHigh - schedule nextscope:estateAffects many or all repos across the estateAffects many or all repos across the estate
Description
Activity
Metadata
Metadata
Assignees
Labels
enhancementNew capability or improvement to existing behaviourNew capability or improvement to existing behaviourfeeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes thereFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes therepriority:p1High - schedule nextHigh - schedule nextscope:estateAffects many or all repos across the estateAffects many or all repos across the estate
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/.