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
The b895374/#122 band-aid seeded Some/None/Ok/Err as flat builtins so
files resolved without importing prelude — entrenching the interpreter-
era flat namespace (#138, part of #128).
Root cause it masked: resolve_and_typecheck_module (the path used when a
module is pulled in via `use`) resolved a dependency's decls but never
its OWN imports, so an imported module couldn't reach prelude
constructors / sibling modules on its own. The global seed hid this.
- resolve.ml: drop Some/None/Ok/Err from seed_builtins (keep
RuntimeError — genuine interpreter exception variant, no module home).
- resolve.ml: make resolve_and_typecheck_module / resolve_imports_with_loader
mutually recursive so an imported module resolves its own
`use prelude::{...}` / `use string::{...}` through the loader. The
stdlib import graph is an acyclic DAG (max depth io->string->prelude).
- typecheck.ml: drop the mirrored Some/None/Ok/Err builtin schemes
(keep RuntimeError, keep opt/res type-ctor helpers for builtin sigs);
remove the stray "If without else returns…" debug eprintf.
- string/io/testing.affine: add the proper `use prelude::{...}`
imports they were relying on the seed for (ADR-011).
- test_e2e: de-couple the nested-generic return-position test from the
seed (exercise the type syntax without constructing Ok/None), like
its param-position siblings.
stdlib 19/19 via the proper module path; 233/233 dune test; zero regression.
Refs #128
Refs #138
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments