Skip to content

Docs: bring core documentation up to date - #94

Merged
284km merged 5 commits into
mainfrom
docs-core-refresh-2026-11-28
Nov 28, 2026
Merged

284km merged 5 commits into
mainfrom
docs-core-refresh-2026-11-28

Conversation

@284km

@284km 284km commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Brings the core documentation in line with current main (source version v0.1.732, plus the changes merged after it). contrib/ READMEs are out of scope here and handled separately.

Facts were taken from the repository itself: the built compiler (mere --help, --dump-builtins, running the documented commands and snippets), lib/lexer.ml / lib/lsp.ml / the C runtime in lib/codegen_c.ml, test/escape/ROUTES, the CI and release workflows, docs/changelog.md entries since each page was last touched, and git log for the commits after v0.1.732.

Per file

README.md

  • Benchmark tables dated to the version that measured them (binarytrees at v0.1.323, per the changelog; crc32 recorded with v0.1.325) and the later v0.1.419 footprint change noted, instead of presenting them as current.
  • Escape-route summary: 27 routes, 14 rejected / 13 accepted (was "sixteen: ten / six"), from test/escape/ROUTES.
  • JSON quick example now prints something (contrib/json/json.mere lost its self-test, so running it printed nothing). The self-emit size is 2.56 MB, re-run here.
  • Documentation list gains the pages it was missing (tour, host matrix, reserved names, the boundary pages, the Go SIMD comparison); db.md is described as PG + MySQL + Redis with 38 demos; bare-metal as RV32IM / RV64IM.
  • f32x4; RISC-V float lanes and fma in software (v0.1.656); the LSP answers added since v0.1.504; mere check has no -rv64 form; layout tree refreshed; contrib description no longer lists the moved markdown library.
  • mere-ruby described without the stale line count / corpus size.

CONTRIBUTING.md — dune fmt does not apply (there is no .ocamlformat); mere fmt; a short list of the gates that hold the docs to the code (doc coverage, host matrix, keywords, first-run counts).

examples/README.md — about 120 top-level examples and a dozen directories were in no section. Added "More examples, by subject", with descriptions taken from each file's header comment; db/http files point to their catalogs. File count corrected. The Wasm recipe gains --enable-tail-call (toy_sql's WAT uses return_call and plain wat2wasm rejects it).

benchmarks/README.md — "three things" list has four items; "seven workloads" is about the first seven; LLVM lowers read_bytes now (host matrix), so those rows are unmeasured rather than impossible.

docs/language-reference.md — new section on user traits (trait / impl / derive / dyn, v0.1.92–109), which were implemented but undocumented; ranges include both ends (0..5 is [0, 1, 2, 3, 4, 5]; the page said [a, ..., b-1]); full escape list and integer spellings in the literal table; status summary points at the README's derived counts.

docs/tutorial.md — same range fix (12 pairs, not 9); while !done is a lex error (not); LLVM decodes of_json since v0.1.665; FFI types and module limits as they are now (open M.N works, constructors are scoped); RISC-V row in the backend table; https clone + opam install . --deps-only.

docs/tour.md — two snippets were not complete programs (print ...; followed by an expression is a parse error); links use .md so they also work on GitHub (the site rewrites them to .html).

docs/lsp.md — folding (v0.1.576), document highlight, type definition, signature help and code actions in the method/capability table; didChange coalescing; intro no longer says "the first type error".

docs/simd.md, docs/simd-go-comparison.md, docs/stdlib-reference.md — RISC-V has f64x2 / f32x4 and fma in software since v0.1.656 (documented as refused).

docs/stdlib-reference.md — the environment holds 341 names (was "221"); mem_trim now releases everything after real work (#87); structural equality compares floats inside compound values by value on every backend (#87, #89); raw-memory builtins are RISC-V --bare at both widths; alphabetical count 123.

docs/memory-model.md — the per-thread released-region cache (v0.1.727/729), -DMERE_REGION_CACHE_CAP, Linux page discard, mem_trim.

docs/codegen.md — LLVM decodes of_json since v0.1.665.

docs/bare-metal.md — the RISC-V backend at both widths (-rv64 / -rv64s / -rv64g), and "the flags" instead of "the three flags".

docs/packages.md — one title for v0.1 + v0.2; duplicated "No version resolution" merged; the module-path step noted under Precedence; RISC-V stack refusal covers -rv64.

docs/db.md — 38 demos (Redis 14), not 32.

docs/patterns.md — while !(...) → while not (...).

docs/reserved-names.md — let main compiles since v0.1.538; only type main collides.

Checks run locally

  • sh scripts/doc_coverage_check.sh — ok (341 builtins, 296 named, 45 excused; no allowlist change needed)
  • sh scripts/keywords_doc_check.sh — ok
  • sh scripts/doc_claims_check.sh — 19 claims, 0 stale
  • sh scripts/doc_cmd_check.sh — ok
  • sh scripts/host_matrix.sh — ok (generated table unchanged)
  • sh scripts/first_run_check.sh — PASS on main before the change (10 README commands, parity 257, tests 3305); the README transcript part re-run after the edit: 10 commands, 0 failures
  • every mere snippet in docs/tour.md runs; the new traits snippet runs; relative links in the touched files resolve

Not changed, worth a look

  • docs/http-demos.md catalog anchors (#todo-app) match the docs site's slugger but not GitHub's (#todo_app); left as is.
  • docs/host-matrix.md is generated; its intro still says "RV32I", and it reports of_json as refused on C/LLVM although both decode a concrete record type (likely the probe's synthesized target type).

🤖 Generated with Claude Code

README: date the benchmark tables to the versions that measured them and
note the later footprint change; the escape table is 27 routes now (14
rejected, 13 accepted); the JSON quick example runs something (json.mere
lost its self-test); the self-emit size is 2.56 MB; list the docs that
were missing from the Documentation section (tour, host matrix, reserved
names, the boundary pages, the Go SIMD comparison); f32x4; the LSP
answers added since v0.1.504; db.md covers MySQL and Redis with 38 demos;
mere check has no -rv64 form; refresh the layout tree.

CONTRIBUTING: dune fmt does not apply (no .ocamlformat); name the gates
that hold the docs to the code.
examples/README.md: about 120 top-level examples and a dozen directories
were in no section. Add 'More examples, by subject', with descriptions
taken from each file's header comment, and point db_*/http_* at their
catalogs in docs/. Correct the file count, and give the Wasm recipe
--enable-tail-call (toy_sql's WAT has return_call and plain wat2wasm
rejects it).

benchmarks/README.md: the list of things to get right has four items;
the 'seven workloads' note is about the first seven; the LLVM backend
lowers read_bytes now (host matrix), so the UTF-8 rows are unmeasured
there rather than impossible.
language-reference: document user traits (trait / impl / derive / dyn,
v0.1.92-109), which had no section at all; ranges include both ends
(0..5 is [0, 1, 2, 3, 4, 5]); the literal table lists every string and
char escape the lexer accepts and the integer spellings from v0.1.513;
the status summary points at the README's derived counts.

tutorial: the same range fix (and 12 pairs, not 9); 'while !done' is a
lex error, use not; LLVM decodes of_json since v0.1.665; FFI types and
module limits as they are now (open M.N works, constructors are scoped);
the backend table gains RISC-V; https clone plus opam deps.

tour: two snippets were not complete programs ('print ...;' followed by
another expression is a parse error); links use .md so they work on
GitHub as well as on the site.

patterns: 'while !(...)' -> 'while not (...)'.
reserved-names: 'let main' compiles since v0.1.538; only 'type main'
collides.
…and later

- lsp: folding (v0.1.576), document highlight, type definition, signature
  help and code actions in the method table and capabilities; didChange
  coalescing; the intro no longer says only the first type error.
- simd, simd-go-comparison, stdlib-reference: RISC-V has f64x2 / f32x4
  and fma in software since v0.1.656 (they were documented as refused).
- stdlib-reference: the environment holds 341 names, not 221; mem_trim
  releases everything after real work (main after v0.1.732); structural
  equality compares floats inside compound values by value on every
  backend; raw-memory builtins are RISC-V --bare at both widths.
- memory-model: the per-thread released-region cache (v0.1.727/729),
  -DMERE_REGION_CACHE_CAP and mem_trim.
- codegen: LLVM decodes of_json since v0.1.665.
- bare-metal: the RISC-V backend at both widths (-rv64 / -rv64s / -rv64g).
- packages: one title for v0.1 + v0.2, the duplicated non-goal merged,
  the module-path step noted in Precedence, RISC-V stack refusal.
- db: 38 demos (Redis 14), not 32.

@284km 284km left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 3f7acdc against current main 4f2c660. No actionable issues found in the documentation changes. The inclusive-range corrections, runnable tour examples, dated benchmark claims, and explicit backend limitations make these pages substantially easier to rely on.

Validation performed in a fresh temporary clone: dune build ./bin/mere.exe; documentation coverage (341 builtins, 296 documented, 45 excused); keyword documentation (32 reserved words); documentation claims (19 checked, zero stale); and the mere doc contract check all passed. All ten Mere snippets from the tour and the new traits example executed successfully. The inclusive-range/list-comprehension outputs and replacement JSON quick example matched the documented results. Relative file links across all 18 changed documents resolve; the example inventory is 291 top-level Mere files and 25 directories. The host-matrix check is still running and is not counted as a pass. No runtime or build inputs changed.

Hosted CI is still executing, so this is not full CI acceptance. No merge performed: the recorded hold_all_merges / new_failure_review_required flags remain active. The latest main compiler CI run 45654290056 has all 17 jobs successful; the mere-ruby main run 46139509888 still has no jobs available. Those observations do not independently clear the recorded original-file failure hold.

@284km
284km merged commit 0109d7f into main Nov 28, 2026
17 checks passed
@284km
284km deleted the docs-core-refresh-2026-11-28 branch November 28, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant