Repository navigation
Docs: bring core documentation up to date - #94
Conversation
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
left a comment
There was a problem hiding this comment.
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.
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 inlib/codegen_c.ml,test/escape/ROUTES, the CI and release workflows,docs/changelog.mdentries since each page was last touched, andgit logfor the commits after v0.1.732.Per file
README.md
test/escape/ROUTES.contrib/json/json.merelost its self-test, so running it printed nothing). The self-emit size is 2.56 MB, re-run here.f32x4; RISC-V float lanes andfmain software (v0.1.656); the LSP answers added since v0.1.504;mere checkhas no-rv64form; layout tree refreshed; contrib description no longer lists the moved markdown library.CONTRIBUTING.md —
dune fmtdoes 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 usesreturn_calland plainwat2wasmrejects it).benchmarks/README.md — "three things" list has four items; "seven workloads" is about the first seven; LLVM lowers
read_bytesnow (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..5is[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 !doneis a lex error (not); LLVM decodesof_jsonsince v0.1.665; FFI types and module limits as they are now (open M.Nworks, 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.mdso 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/f32x4andfmain software since v0.1.656 (documented as refused).docs/stdlib-reference.md — the environment holds 341 names (was "221");
mem_trimnow 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--bareat 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_jsonsince 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 maincompiles since v0.1.538; onlytype maincollides.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— oksh scripts/doc_claims_check.sh— 19 claims, 0 stalesh scripts/doc_cmd_check.sh— oksh 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 failuresmeresnippet in docs/tour.md runs; the new traits snippet runs; relative links in the touched files resolveNot changed, worth a look
docs/http-demos.mdcatalog anchors (#todo-app) match the docs site's slugger but not GitHub's (#todo_app); left as is.docs/host-matrix.mdis generated; its intro still says "RV32I", and it reportsof_jsonas refused on C/LLVM although both decode a concrete record type (likely the probe's synthesized target type).🤖 Generated with Claude Code