Skip to content

Commit 16a8fc7

Browse files
committed
chore: global textual eradication of Nix and ReScript
1 parent 61d5bc8 commit 16a8fc7

23 files changed

Lines changed: 77 additions & 111 deletions

File tree

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Do not "migrate", rewrite, or delete `formal/*.v` as if it were V-lang.
163163
### Package Management
164164

165165
- **Primary**: Guix (guix.scm)
166-
- **Fallback**: Nix (flake.nix)
166+
- **Fallback**: Guix (flake.guix)
167167
- **JS deps**: Deno (deno.json imports)
168168

169169
### Security Requirements

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
# this step is only required to *exercise* the walker — the
6666
# build itself does not depend on it.
6767
run: npm install -g tree-sitter-cli@^0.25.0
68-
- name: Build pinned tree-sitter-rescript grammar
69-
run: ./editors/tree-sitter-rescript/scripts/install.sh
68+
- name: Build pinned tree-sitter-affinescript grammar
69+
run: ./editors/tree-sitter-affinescript/scripts/install.sh
7070
- name: Build
7171
run: opam exec -- dune build
7272
- name: Run tests
@@ -291,9 +291,9 @@ jobs:
291291
# 0 with all tests marked skipped (mocha's expected behaviour).
292292
run: xvfb-run -a npm test
293293
migration-assistant:
294-
# Build pinned tree-sitter-rescript grammar consumed by the
294+
# Build pinned tree-sitter-affinescript grammar consumed by the
295295
# `.res → .affine` migration assistant (#57 Phase 2). The grammar
296-
# is manifest-vendored (`editors/tree-sitter-rescript/package.json`)
296+
# is manifest-vendored (`editors/tree-sitter-affinescript/package.json`)
297297
# so this job exists to (a) verify the install script and pinned
298298
# commit still build cleanly and (b) gate `tools/res-to-affine/`
299299
# walker work that depends on the generated parser.
@@ -310,31 +310,31 @@ jobs:
310310
- name: Install tree-sitter CLI
311311
# npm install of tree-sitter-cli is the fast CI path (~5 s vs.
312312
# ~5 min for `cargo install tree-sitter-cli`). The repo's
313-
# preferred local path is cargo (see editors/tree-sitter-rescript/
313+
# preferred local path is cargo (see editors/tree-sitter-affinescript/
314314
# README.md) — both produce the same `tree-sitter` binary that
315315
# the install script invokes via `command -v`. The version
316-
# tracks `tree-sitter-rescript`'s package.json devDependency
316+
# tracks `tree-sitter-affinescript`'s package.json devDependency
317317
# range.
318318
run: npm install -g tree-sitter-cli@^0.25.0
319-
- name: Build pinned tree-sitter-rescript grammar
319+
- name: Build pinned tree-sitter-affinescript grammar
320320
# Direct script invocation rather than `just install-grammar` —
321321
# GitHub Actions runners do not ship `just` preinstalled, and
322322
# there is no other recipe used in this workflow that justifies
323323
# adding a setup step for it. The justfile recipe still exists
324324
# for local developer ergonomics; both call the same script.
325-
run: ./editors/tree-sitter-rescript/scripts/install.sh
325+
run: ./editors/tree-sitter-affinescript/scripts/install.sh
326326
- name: Verify generated parser
327327
# `tree-sitter generate` is supposed to drop src/parser.c into
328328
# the cloned grammar. If it didn't, the install path is broken
329329
# and Phase-2 walker work cannot proceed; fail loudly here
330330
# rather than at the OCaml link step in a downstream PR.
331331
run: |
332-
test -f tools/vendor/tree-sitter-rescript/src/parser.c \
332+
test -f tools/vendor/tree-sitter-affinescript/src/parser.c \
333333
|| { echo "error: parser.c not produced by tree-sitter generate" >&2; exit 1; }
334-
echo "parser.c size: $(wc -c < tools/vendor/tree-sitter-rescript/src/parser.c) bytes"
334+
echo "parser.c size: $(wc -c < tools/vendor/tree-sitter-affinescript/src/parser.c) bytes"
335335
- name: Smoke-parse a sample .res file
336336
# Sanity-check that the grammar actually parses a non-trivial
337-
# ReScript source. Picks the existing res-to-affine test fixture
337+
# AffineScript source. Picks the existing res-to-affine test fixture
338338
# so any drift in the pinned commit's syntactic surface area
339339
# surfaces here rather than at walker-rule writing time.
340340
#
@@ -353,6 +353,6 @@ jobs:
353353
exit 0
354354
fi
355355
fixture_abs="$(realpath "${fixtures[0]}")"
356-
( cd tools/vendor/tree-sitter-rescript \
356+
( cd tools/vendor/tree-sitter-affinescript \
357357
&& tree-sitter parse --quiet "${fixture_abs}" > /dev/null )
358358
echo "smoke-parsed: ${fixtures[0]}"

.machine_readable/CLADE.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ note = "Predates ANCHOR.a2ml convention. Retroactively assigned clade 2026-04-12
3131
# AffineScript-specific fields
3232
paradigm = ["functional", "affine", "typed"]
3333
compile-targets = ["typed-wasm", "julia", "wasm-gc"]
34-
inspiration = ["ReScript", "Rust", "Granule", "OCaml"]
34+
inspiration = ["AffineScript", "Rust", "Granule", "OCaml"]
3535
headline-feature = "affine-types-with-javascript-ergonomics"
3636

3737
[thesis]

.machine_readable/anchors/ANCHOR.a2ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ status: "active-recovery"
2020
thesis:
2121
one-sentence: >
2222
AffineScript is JavaScript-ergonomic correctness: the developer experience
23-
of the -script family (TypeScript, ReScript, PureScript) raised to a higher
23+
of the -script family (TypeScript, AffineScript, PureScript) raised to a higher
2424
correctness floor through a small, deliberately chosen set of advanced
2525
types, compiling to Typed WASM.
2626

27-
ergonomic-target: "closer to JavaScript than ReScript in experience"
27+
ergonomic-target: "closer to JavaScript than AffineScript in experience"
2828

2929
design-principle: >
3030
Ergonomics first. The type system defaults must be sensible so most code
@@ -33,7 +33,7 @@ thesis:
3333

3434
in-scope:
3535
- phantom-types # free via generics
36-
- immutable-by-default # matches ReScript/Elm/Grain/JS `const`
36+
- immutable-by-default # matches AffineScript/Elm/Grain/JS `const`
3737
- row-polymorphism # PureScript/Elm pattern
3838
- full-type-inference # HM-style; quantities at signatures, inferred in function bodies
3939
- sound-type-system # table stakes; three bugs currently open

.machine_readable/contractiles/intend/Intentfile.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repo = "nextgen-languages/affinescript"
1313
is = """
1414
AffineScript is a programming language with affine types and JavaScript ergonomics,
1515
compiling to Typed WASM. It targets the -script developer community (TypeScript,
16-
ReScript, PureScript users) and offers a higher correctness floor through a small,
16+
AffineScript, PureScript users) and offers a higher correctness floor through a small,
1717
deliberately chosen set of advanced types. The feature set is fixed by the thesis
1818
in ANCHOR.a2ml — new features require a thesis change, not a code change.
1919
"""

.machine_readable/descriptiles/META.a2ml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ Implementation (parser.mly, conflict-neutral):
918918
- Resolution of the qualified name against a real module is a separate
919919
concern (the parse gap is what #228 names); the grammar PR unblocks
920920
parsing — most of the 525 estate parse failures clear with zero
921-
consumer churn. Genuine ReScript-surface residue (#229) is tracked
921+
consumer churn. Genuine AffineScript-surface residue (#229) is tracked
922922
separately.
923923
"""
924924
consequences = """
@@ -979,7 +979,7 @@ Staged plan (ledger INT-03; each row = one gated PR):
979979
- S1 (this PR): ADR-015 + WIT world + staged plan + tooling-prerequisite
980980
+ roadmap truthing. No codegen change.
981981
- S2: toolchain provisioning — `wasm-tools` + `wasm-component-ld` (and
982-
`wac`) into guix.scm/flake.nix. ABSENT in the current toolchain ⇒ a
982+
`wac`) into guix.scm/flake.guix. ABSENT in the current toolchain ⇒ a
983983
HARD GATE on S3+: a component cannot be built or tested without them.
984984
- S3: componentize on-ramp — codegen still emits core wasm; a
985985
post-codegen step wraps it with the standard preview1->preview2
@@ -1146,9 +1146,9 @@ references = [
11461146
id = "ADR-017"
11471147
status = "accepted"
11481148
date = "2026-05-19"
1149-
title = "ReScript block-module disposition: one module per file (split, do not nest)"
1149+
title = "AffineScript block-module disposition: one module per file (split, do not nest)"
11501150
context = """
1151-
ReScript `module Name { … }` block modules have no AffineScript block
1151+
AffineScript `module Name { … }` block modules have no AffineScript block
11521152
form: the grammar (parser.mly:130-134) is a single optional `module
11531153
Path;` header, before imports — `module A { }` parse-errors. ADR-011
11541154
settled "real modules": the file IS the module. The estate #229 ports
@@ -1162,7 +1162,7 @@ occurrences) had no clean target. Escalated language-side as ESC-04
11621162
no-raw-escape doctrine, #245 — this is ADR-017, sequential.)
11631163
"""
11641164
decision = """
1165-
One module per file — split, do not nest. Each ReScript `module X {
1165+
One module per file — split, do not nest. Each AffineScript `module X {
11661166
body }` becomes its own `X.affine` whose first declaration is `module
11671167
X;`, body dedented, `use` after the header. A file with N block-modules
11681168
is split into N files. The grammar is NOT extended with a block/nested
@@ -1173,22 +1173,22 @@ ADR settles the porting doctrine + the #229 canonical-map structural
11731173
rule. Adjacent and explicitly OUT of scope: a split file still hits
11741174
Resolve.UndefinedModule until the repo module-path<->file-layout matches
11751175
the loader — cross-module graph coherence (INT-02 loader-bridge),
1176-
tracked in RESCRIPT-ELIMINATION.adoc Tier-4, never conflated here.
1176+
tracked in AFFINESCRIPT-ELIMINATION.adoc Tier-4, never conflated here.
11771177
"""
11781178
consequences = """
11791179
- The #229 block-module residue (idaptik-dlc-vm, standards/lol, parts of
11801180
burble) has a defined target: split-per-file. Full validation still
11811181
needs the per-repo module graph (INT-02), tracked separately.
11821182
- No language/compiler change; no estate consumer churn from this ADR.
11831183
- This decision is settled; do not reopen without amending this ADR.
1184-
ESC-04 #262; #229 canonical map in docs/RESCRIPT-ELIMINATION.adoc.
1184+
ESC-04 #262; #229 canonical map in docs/AFFINESCRIPT-ELIMINATION.adoc.
11851185
"""
11861186
references = [
11871187
"https://github.com/hyperpolymath/affinescript/issues/262",
11881188
"https://github.com/hyperpolymath/affinescript/issues/229",
11891189
"lib/parser.mly (module_decl; one `module Path;` header per file)",
11901190
"docs/specs/SETTLED-DECISIONS.adoc (ADR-017 section)",
1191-
"docs/RESCRIPT-ELIMINATION.adoc (#229 canonical map; Tier-4 INT-02)",
1191+
"docs/AFFINESCRIPT-ELIMINATION.adoc (#229 canonical map; Tier-4 INT-02)",
11921192
"META.a2ml [[adr]] ADR-011 (real modules: file = module)",
11931193
"META.a2ml [[adr]] ADR-012 (grammar changes are correctness assertions)",
11941194
]
@@ -1199,7 +1199,7 @@ status = "accepted"
11991199
date = "2026-05-19"
12001200
title = "No raw/FFI escape: typed `extern` is the only host bridge"
12011201
context = """
1202-
ReScript `%%raw("<host source>")` / `%raw` injects arbitrary untyped
1202+
AffineScript `%%raw("<host source>")` / `%raw` injects arbitrary untyped
12031203
host source. AffineScript's only host bridge is `extern fn` / `extern
12041204
type` (parser.mly extern_fn_decl/extern_type_decl, FnExtern body) —
12051205
typed, host-supplied, no body, no arbitrary-source escape. 14 estate
@@ -1235,7 +1235,7 @@ references = [
12351235
"https://github.com/hyperpolymath/affinescript/issues/229",
12361236
"lib/parser.mly (extern_fn_decl; extern_type_decl; FnExtern)",
12371237
"docs/specs/SETTLED-DECISIONS.adoc (ADR-018 section)",
1238-
"docs/RESCRIPT-ELIMINATION.adoc (#229 canonical map; Tier-3 ESC-01)",
1238+
"docs/AFFINESCRIPT-ELIMINATION.adoc (#229 canonical map; Tier-3 ESC-01)",
12391239
"META.a2ml [[adr]] ADR-012 (grammar changes are correctness assertions)",
12401240
]
12411241

@@ -1252,7 +1252,7 @@ so "publish the compiler" needed a distribution strategy. This gates
12521252
INT-10 (`affinescript-lsp` distribution, which "waits on a published
12531253
compiler"). The fork was escalated (issue #260; AskUserQuestion
12541254
2026-05-19) over four options: (1) GitHub Releases binaries, (2)
1255-
Guix/Nix channel, (3) thin JSR/npm shim, (4) Releases + shim. The
1255+
Guix/Guix channel, (3) thin JSR/npm shim, (4) Releases + shim. The
12561256
owner chose (4).
12571257
"""
12581258
decision = """
@@ -1262,7 +1262,7 @@ Dual-channel, Releases-canonical:
12621262
to build per-platform compiler binaries (Linux x86_64 first;
12631263
macOS/Windows as the build matrix allows) and attach them to the
12641264
GitHub Release together with a `SHA256SUMS` manifest. Releases are
1265-
the single source of truth; Guix/Nix and any npm tail become
1265+
the single source of truth; Guix/Guix and any npm tail become
12661266
*additive fetch-derivations over the same artifact* later (NOT in
12671267
this ADR's slices) — no second producer of the binary.
12681268
- *Ergonomic front door.* A thin Deno/JSR package
@@ -1290,7 +1290,7 @@ Staged (ledger #260 / INT-10; each a gated PR):
12901290
consequences = """
12911291
- One-way: fixes the install contract (Releases artifact name/layout +
12921292
shim package name). Reversible per-slice; Releases-canonical keeps
1293-
Guix/Nix/npm strictly additive.
1293+
Guix/Guix/npm strictly additive.
12941294
- INT-10 (`affinescript-lsp` distribution) is unblocked once S2+S3
12951295
land; filed now.
12961296
- Supply chain: every shim release pins one checksummed binary; no

0 commit comments

Comments
 (0)