commit 60edcfe7c38d8ef4b2f6099ff37b70643c14a35b parent a3fcd473bc16904e71ea4b7adb902fb36d2a5e12 Author: James Eversole <james@eversole.co> Date: Mon, 26 Oct 2026 17:19:20 -0500 Prepare binary64 browser libraries and checked usage examples Diffstat:
19 files changed, 690 insertions(+), 24 deletions(-)
diff --git a/bench/float-site-results.json b/bench/float-site-results.json @@ -0,0 +1,43 @@ +{ + "schema": "tricu.binary64-site.v1", + "version": "0.12.0", + "library_interfaces": 78, + "indexed_releases": 928, + "site": "/nix/store/kr2s74iwr2jyflw8lid8h2y3m4wymmzr-arboricx-site", + "dependencies": "/nix/store/ic6r0j7vkj3wdx5m2ypfhny12w3vzibg-arboricx-site-deps", + "compiler_pin": { + "schema": 1, + "hash": "3d1a7bc92cddc5b47c722363a2069b3a6ef48f586fb6d26e810f69e6edfaabaa", + "export": "source_unit.compileStableModuleDefinitions", + "backend": "stable", + "reference": "test/fixtures/compiler-library.arboricx", + "referenceCommit": "0626a9429ec6b555d0d2a2c90ae0ce961b02a5e7" + }, + "validation": { + "node_tests": 222, + "browser": "Chromium import-picker matrix, documented binary64 and structured IO examples", + "nix_flake_check": "x86_64-linux passed", + "javascript_parity": "passed" + }, + "logs": { + "library-preparation": { + "path": "/home/sezycei/dev/tricu/.bootstrap-run/binary64-aa31bf6/site-evidence/library-preparation.log", + "sha256": "227d7fccc5b02e522bbb6f98e4b9af5116975977f03c6bfb54dbb3bb1fbd61ec" + }, + "node": { + "path": "/home/sezycei/dev/tricu/.bootstrap-run/binary64-aa31bf6/site-evidence/node.log", + "sha256": "68559de778b6577e18e2700befba33b7f824ec251174f4e0f53f0761c0111a03" + }, + "browser": { + "path": "/home/sezycei/dev/tricu/.bootstrap-run/binary64-aa31bf6/site-evidence/browser.log", + "sha256": "e183bcc0dd079e307168aeed1a3f853c37bc9941de282e63f5284a95c85661cb" + }, + "nix": { + "path": "/home/sezycei/dev/tricu/.bootstrap-run/binary64-aa31bf6/site-evidence/nix.log", + "sha256": "4aa4f5abdb92b4212692c688d58f466add4332ebd156b8691665c18f43dbf86d" + } + }, + "deployment": "local release assets", + "merge": "awaits coordination with independently changed main", + "retention": "preparations and outputs retained; pruning disabled" +} diff --git a/ext/demo-site/README.md b/ext/demo-site/README.md @@ -165,9 +165,11 @@ The references are static text and also work for readers using a browser. `reference.py` derives every published library interface from the bundle export table, including reexports, and checks its bundle SHA-256. It generates the picker's `reference/libraries.json` and per-release Markdown from the same records. -Calling conventions in `reference-input/libraries.json` are version-scoped; +Calling conventions in `reference-input/libraries.json` select their `version` +(default `0.1.0`); `reference-input/examples.json` pins explicit module versions and independent -expected results. The browser matrix compiles and runs these examples on both +expected results. A `{{name@version}}` placeholder selects that exact release; +`{{name}}` selects version `0.1.0`. The browser matrix compiles and runs these examples on both backends. Source pages are labelled repository references with source hashes; the published export table describes the selected release's actual interface. diff --git a/ext/demo-site/bundles/07a31b081d54b9706dd7971b146aebff7033a40cbbea124eddd414e0e5397a45.arboricx b/ext/demo-site/bundles/07a31b081d54b9706dd7971b146aebff7033a40cbbea124eddd414e0e5397a45.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/34f5b71ad545a7abba017e72e1647ef519920ada6f841e87ff5dbe78558d79d5.arboricx b/ext/demo-site/bundles/34f5b71ad545a7abba017e72e1647ef519920ada6f841e87ff5dbe78558d79d5.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/46c39bcfd61444c366a25656133abf0397515111736a6fbacc469a760c7fbbe1.arboricx b/ext/demo-site/bundles/46c39bcfd61444c366a25656133abf0397515111736a6fbacc469a760c7fbbe1.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/487e335a7e0a504da9b2c223639a1c999746605b3a02762557a6aed878875fe1.arboricx b/ext/demo-site/bundles/487e335a7e0a504da9b2c223639a1c999746605b3a02762557a6aed878875fe1.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/86a141f88c89eb929f74e2678a77fe7ae02b3bf78c15788f5d3c7d5745fba1d8.arboricx b/ext/demo-site/bundles/86a141f88c89eb929f74e2678a77fe7ae02b3bf78c15788f5d3c7d5745fba1d8.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/921350bbe5dd0af4d5e5ab526ba4bc78d0473bd54bf9d9474ca0be9331881eac.arboricx b/ext/demo-site/bundles/921350bbe5dd0af4d5e5ab526ba4bc78d0473bd54bf9d9474ca0be9331881eac.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/94e9a15b7c3060c430fc60a74200e10e5ed4f3b43c708423a982a6c53df0cd38.arboricx b/ext/demo-site/bundles/94e9a15b7c3060c430fc60a74200e10e5ed4f3b43c708423a982a6c53df0cd38.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/9b7cdb9330c85124759bc0a5855f5273eab808eea416ec6a5d0b915604f7078a.arboricx b/ext/demo-site/bundles/9b7cdb9330c85124759bc0a5855f5273eab808eea416ec6a5d0b915604f7078a.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/ba77d73c2f0abb2fa4288fc626696140c9aeafde2df6c6a11eb5d6e891a094cd.arboricx b/ext/demo-site/bundles/ba77d73c2f0abb2fa4288fc626696140c9aeafde2df6c6a11eb5d6e891a094cd.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/d10478e6889a0305755fe2b0edd7545b8e0ce98c4cd888a5753e2de423c6307f.arboricx b/ext/demo-site/bundles/d10478e6889a0305755fe2b0edd7545b8e0ce98c4cd888a5753e2de423c6307f.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/d142330c8402dde34fcf68db82abc00e627ebc7dcfc58c91d5aa4ff916612d72.arboricx b/ext/demo-site/bundles/d142330c8402dde34fcf68db82abc00e627ebc7dcfc58c91d5aa4ff916612d72.arboricx Binary files differ. diff --git a/ext/demo-site/bundles/dac36c38df0cebf1e269f06c879dce3f38515cf7d828c93066f9484daa32f61b.arboricx b/ext/demo-site/bundles/dac36c38df0cebf1e269f06c879dce3f38515cf7d828c93066f9484daa32f61b.arboricx Binary files differ. diff --git a/ext/demo-site/packages.json b/ext/demo-site/packages.json @@ -6036,6 +6036,552 @@ "manifest": "05e75a9f4d3c40db786f64820b78774566b8d51d77d11e6e1e244dad9360568e", "hash": "48ae69290f1858d9534fe1f60f7540ecaca466b6ec1f48a208c7b73981277fef", "title": "lib/tools/format-tri.tri" + }, + { + "name": "tricu-lib-arboricx", + "version": "0.12.0", + "manifest": "3f70d95cf1bae0928ee89acd2a9e0cdd8287796efae32a9f08d33e3dd0149c55", + "hash": "20ddb39e1a87ad0708a374aebe7b6884e5729124bc7cc30d2e9f96f0c0d713ee", + "title": "lib/arboricx/arboricx.tri" + }, + { + "name": "tricu-lib-arboricx-common", + "version": "0.12.0", + "manifest": "0d779adef29b51ee875bf2f46ec03bef30ec48d200e7e05c9e20bd90b28ac4a4", + "hash": "6238f17acf707772ac12645f14297fd8b335af45b9189b9dc4c320a18893e50f", + "title": "lib/arboricx/common.tri" + }, + { + "name": "tricu-lib-arboricx-dispatch", + "version": "0.12.0", + "manifest": "eda078ba018de68718b2b7aa2d790578ac079cf98c963a78f7fcae5178fd2c19", + "hash": "ccf21f4b49546f330cf335cf768cfc2d146549831dd84e79d80bbbe4da03b914", + "title": "lib/arboricx/dispatch.tri" + }, + { + "name": "tricu-lib-arboricx-handlers", + "version": "0.12.0", + "manifest": "2c1c876d1baf0c2ddf0bd212ecd9acd3eb916d8f492d271177c6db0be84ff29d", + "hash": "ebd32c489da78229fdabb295805c8b7d8d9a98599900ddcff3baee23b5668746", + "title": "lib/arboricx/handlers.tri" + }, + { + "name": "tricu-lib-arboricx-manifest", + "version": "0.12.0", + "manifest": "2a8a2b591dfc4192b8ded6e2ea75e94f6ff41183636f6024b6d5eb590ec8d2aa", + "hash": "4382e93cddca0d828b6a39ce171ae0253a54fb9932be4bc54d747cf698fa58fe", + "title": "lib/arboricx/manifest.tri" + }, + { + "name": "tricu-lib-arboricx-nodes", + "version": "0.12.0", + "manifest": "d158e4ebe9fd6cfb752023bbe031614b190b9eab79e9680875a1fc55dc481a23", + "hash": "cc68d1a06bc193f54069be7553bcaa3ccd37d129c9a38fff9b8220b2d864daee", + "title": "lib/arboricx/nodes.tri" + }, + { + "name": "tricu-lib-arboricx-server", + "version": "0.12.0", + "manifest": "a6876256adddf94e4631b6e14540df4db22b6ece63444ad963dc92174acee48d", + "hash": "7f18bb0a5c425b055912aecdd442776f3102f023c70e721395b3296ff0d42689", + "title": "lib/arboricx/server.tri" + }, + { + "name": "tricu-lib-arboricx-streaming", + "version": "0.12.0", + "manifest": "409b5431c67c3e8e5e3ae64b85c2d66259576e73ebc02708af37de12139946f6", + "hash": "4458cd3946a4280a41b7d723795b90987225ae65cb44ee6241186d7c03029f3c", + "title": "lib/arboricx/streaming.tri" + }, + { + "name": "tricu-lib-base", + "version": "0.12.0", + "manifest": "bd2c14d6db6b69308a5252a8e839705a55d30e815f012900b094315263e08d81", + "hash": "1187e9fb4391f64e84a86150e6aecbcf19b73e0df5f2e4266c85b1fba0756454", + "title": "lib/base.tri" + }, + { + "name": "tricu-lib-binary", + "version": "0.12.0", + "manifest": "7a24af56a9ce9b947cadcafd3a9da127b1507275bfac62b9fa55e27490b176dc", + "hash": "1a52036b938708db5759dfa94c2058e27df5b638c625ef253b5e09e316c2a21d", + "title": "lib/binary.tri" + }, + { + "name": "tricu-lib-bytes", + "version": "0.12.0", + "manifest": "16cff955cb9ab44063ed21651002d209ef7d3592fa005cd3dc32e287d6ca5b68", + "hash": "8ee2c0b4fec670afc9db5552e6907ace29ae2c0bda07897e70d451f9bb56160c", + "title": "lib/bytes.tri" + }, + { + "name": "tricu-lib-conversions", + "version": "0.12.0", + "manifest": "78ce6db3557cd57f2c5799989d16a8f40104de5c4485646734a23093dc458a4e", + "hash": "4641a286fd7129b4ee90b47c54623104aaacf7e1fdc30d56ce12b17acf7a106b", + "title": "lib/conversions.tri" + }, + { + "name": "tricu-lib-graph", + "version": "0.12.0", + "manifest": "7b798a3afae6dce07b718bed855c7209ec3b898bb70b379dece935c4033cf9b6", + "hash": "5d3381723aafa9c5e4c4c3a6975de9481eb3160cbe52aca24076900528ef2603", + "title": "lib/graph.tri" + }, + { + "name": "tricu-lib-handler-artifacts", + "version": "0.12.0", + "manifest": "7465681c852959e227ecea6fa93d8648479af52d92e0898ff7937495d506ff55", + "hash": "99824824d27932bc9e44851fff367ae0fea6d05a7604bb634bf0daad8ef5ab7e", + "title": "lib/handlers/artifacts.tri" + }, + { + "name": "tricu-lib-handler-log", + "version": "0.12.0", + "manifest": "8e266f85d668a1f414dada9e4cca4d19a737bb1e19bf2a1ef985017175708c31", + "hash": "7dac7b3d84202ef4d253ce99c95850c1ae7a532a9e7907712f559da2d061c2d0", + "title": "lib/handlers/log.tri" + }, + { + "name": "tricu-lib-handlers", + "version": "0.12.0", + "manifest": "11d3aa8404e25e3bafad7835fdc008c2b6838cd5d01110edf4297e6fd47c1008", + "hash": "e27bf77a09cdc2d867aaccf65d0578da3308c877e51dea1bb87286ddc7196228", + "title": "lib/handlers.tri" + }, + { + "name": "tricu-lib-http", + "version": "0.12.0", + "manifest": "b33334423eddc3c01098d0c0ad303da37044892cb0b6e6bad22af677ccf3aff6", + "hash": "aa8da80b7ea0e728ed276627737b8cc5350dda77d2360af6eac93b75667acaab", + "title": "lib/http.tri" + }, + { + "name": "tricu-lib-intensional", + "version": "0.12.0", + "manifest": "7467e74f0c5b7dfad8d6a14d34171b2b0bcd7750423894e2ca920e0535fde7d1", + "hash": "ecab246978f122d1c13bc00028ca2cbc9332a8fc247a0b9726d74c712e5c1315", + "title": "lib/intensionalContracts.tri" + }, + { + "name": "tricu-lib-io-artifacts", + "version": "0.12.0", + "manifest": "6acd32c1279a1889feb3bda2f8713f973beb3493107895dbba5fe3b1ad1fe1f3", + "hash": "ae3c5524aa4a094972d2b84aff10e3a9e8d60c3b3fb94b43ff7bd850740eade9", + "title": "lib/io/artifacts.tri" + }, + { + "name": "tricu-lib-io-http", + "version": "0.12.0", + "manifest": "078dbc9ff97ac74a96475abfa117a0aaf0dd6526e0a794a5fff83b498afadf72", + "hash": "45c7b97761cba9e2a2c84bf75ed1da9b6fd612be9a367bd7387db2b0dc4e6e8f", + "title": "lib/io/http-transport.tri" + }, + { + "name": "tricu-lib-io-storage", + "version": "0.12.0", + "manifest": "3d91cca2954567f6741488ea2abc1166803a52db9d5dce82952fe9d69edde15a", + "hash": "b5ee969404912ef682d37b259985a3303b1b19840ac9a15a2f65c92799b4d2cf", + "title": "lib/io/storage.tri" + }, + { + "name": "tricu-lib-io-text", + "version": "0.12.0", + "manifest": "1f960c57efadb21eb66bba8a057181c6ca744b7d110064a37522daabf230d691", + "hash": "9621dfdca33605922b59be467053569d99995ed36b77f52f2a36e07d9059bf95", + "title": "lib/io/text.tri" + }, + { + "name": "tricu-lib-io", + "version": "0.12.0", + "manifest": "867297ac5383885892a84acc2630c94491fc6ea436aaaccd5bc49d866c631400", + "hash": "32ef3ca39a7982bc118da3cb17cecadb2514669b1544a4081dd22c5446919d95", + "title": "lib/io.tri" + }, + { + "name": "tricu-lib-lexer", + "version": "0.12.0", + "manifest": "816df1a32853750a1254112aff8ae8c55ca86bf70e809d226969ab1d43a6688b", + "hash": "5ec6ccb4827f0548444e480c0e6196ddaa7a570a44ebc6a91a922d7e59bf3012", + "title": "lib/lexer.tri" + }, + { + "name": "tricu-lib-binary64-adders", + "version": "0.12.0", + "manifest": "6f7b17e8774d544faf42b3037bbec608cbdf94e80be45b86e95545b9f8c528af", + "hash": "46c39bcfd61444c366a25656133abf0397515111736a6fbacc469a760c7fbbe1", + "title": "lib/math/binary64/adders.tri" + }, + { + "name": "tricu-lib-binary64-chains", + "version": "0.12.0", + "manifest": "e26daaef184000da2327794e462a772ebcc455d373f381911cdbda8fe08308ca", + "hash": "487e335a7e0a504da9b2c223639a1c999746605b3a02762557a6aed878875fe1", + "title": "lib/math/binary64/chains.tri" + }, + { + "name": "tricu-lib-binary64-fast", + "version": "0.12.0", + "manifest": "f0156dbef05d4b2f9c579afc606e306ae721b16160ab69dfcf5e0b6be4b53f4d", + "hash": "dac36c38df0cebf1e269f06c879dce3f38515cf7d828c93066f9484daa32f61b", + "title": "lib/math/binary64/fast.tri" + }, + { + "name": "tricu-lib-binary64-finite", + "version": "0.12.0", + "manifest": "4f3a166a27709e06f5e61c9cd28fe022f676b158956311fe420d9291ae195eee", + "hash": "d142330c8402dde34fcf68db82abc00e627ebc7dcfc58c91d5aa4ff916612d72", + "title": "lib/math/binary64/finite.tri" + }, + { + "name": "tricu-lib-binary64-ieee", + "version": "0.12.0", + "manifest": "35d467903423d601f556e116fc7de1a556d8151649bf5bdcde06a225b9e4a047", + "hash": "94e9a15b7c3060c430fc60a74200e10e5ed4f3b43c708423a982a6c53df0cd38", + "title": "lib/math/binary64/ieee.tri" + }, + { + "name": "tricu-lib-binary64-kernels", + "version": "0.12.0", + "manifest": "d57a40fbc6342af8922e3d89dd94fb2d627d796e06ac71515e2b09c6998ca0c0", + "hash": "ba77d73c2f0abb2fa4288fc626696140c9aeafde2df6c6a11eb5d6e891a094cd", + "title": "lib/math/binary64/kernels.tri" + }, + { + "name": "tricu-lib-binary64-layouts", + "version": "0.12.0", + "manifest": "8ca89c517b3caea9da8d9365684c592b2cca409576f1ba0e58e2584be7df90da", + "hash": "9b7cdb9330c85124759bc0a5855f5273eab808eea416ec6a5d0b915604f7078a", + "title": "lib/math/binary64/layouts.tri" + }, + { + "name": "tricu-lib-binary64-near", + "version": "0.12.0", + "manifest": "440deb3d8cb6c22216fe1583938826f8c3faf14862f4a9fd7425c10a8182baf5", + "hash": "d10478e6889a0305755fe2b0edd7545b8e0ce98c4cd888a5753e2de423c6307f", + "title": "lib/math/binary64/near.tri" + }, + { + "name": "tricu-lib-binary64-product-quotient", + "version": "0.12.0", + "manifest": "767c6d8b08832e4d8e149f60fff4a123355933e79b2f11152d9c6fc51d96da39", + "hash": "86a141f88c89eb929f74e2678a77fe7ae02b3bf78c15788f5d3c7d5745fba1d8", + "title": "lib/math/binary64/product_quotient.tri" + }, + { + "name": "tricu-lib-binary64-quantize", + "version": "0.12.0", + "manifest": "cd5c71e6ab8d5d2825321d6c03876d05c7fb5b226d309f247a5178f1eeaac940", + "hash": "34f5b71ad545a7abba017e72e1647ef519920ada6f841e87ff5dbe78558d79d5", + "title": "lib/math/binary64/quantize.tri" + }, + { + "name": "tricu-lib-binary64-working", + "version": "0.12.0", + "manifest": "2bab53a64f1e4b82cb3102e152de97a1ac3d2847737bc96b807639e7cc502784", + "hash": "921350bbe5dd0af4d5e5ab526ba4bc78d0473bd54bf9d9474ca0be9331881eac", + "title": "lib/math/binary64/working.tri" + }, + { + "name": "tricu-lib-binary64", + "version": "0.12.0", + "manifest": "2d607b17eb92d4cda575d26d12d5cd4e5291c5f9e71156b2c361c1d74ee7122b", + "hash": "07a31b081d54b9706dd7971b146aebff7033a40cbbea124eddd414e0e5397a45", + "title": "lib/math/binary64.tri" + }, + { + "name": "tricu-lib-native-math", + "version": "0.12.0", + "manifest": "7f87549d587fa8c3be88af0ea988db3adcc3b35f1ffb48973553491b075614db", + "hash": "32d3a06a8e3e3e41f9652e6bd00b0708a7ddb4c6c48143121a23a25957e08171", + "title": "lib/math/native.tri" + }, + { + "name": "tricu-lib-parser", + "version": "0.12.0", + "manifest": "14282088469cc420dd014700da06998f6bb8dcf990fc885a464c0a1e1858e20d", + "hash": "65a21f43996fbc503ed2bde3bb1931291a49be373d828cf18b6506f740e87f9c", + "title": "lib/parser.tri" + }, + { + "name": "tricu-lib-patterns", + "version": "0.12.0", + "manifest": "703db8cd6c5679861257d1cc38c17be200241ade8db3812e8c387e9274aaa56e", + "hash": "3f65dce1eb074d496c42c961b0f9149ace2527ce8b3b968622b871ea5c5dc7ed", + "title": "lib/patterns.tri" + }, + { + "name": "tricu-lib-prelude", + "version": "0.12.0", + "manifest": "6aa33a710955e5746f322775b9078f57ba4145f6b723ff4b76a292285e919823", + "hash": "be8b453912dd7528262d4d129de0288734ddda67c10d6bf5f05ba03a3bb4a0d6", + "title": "lib/prelude.tri" + }, + { + "name": "tricu-lib-socket", + "version": "0.12.0", + "manifest": "fbf35bdc703a44baf1f842cc7aff5ced17bec1b634b9e2a185982391feb5086f", + "hash": "ab4b3e164f3cebbf979ad75424b195cbadf3a8a7023a891b46270ef883363d30", + "title": "lib/socket.tri" + }, + { + "name": "tricu-lib-source-ast", + "version": "0.12.0", + "manifest": "c6579f89e47a16694f1c08fe9825b183d8bc272e23cd744eb954c106b689c32f", + "hash": "af66062931c5de826bd336625d53c1c354fe6cc736e56e247ae550c542f0fa8a", + "title": "lib/source/ast.tri" + }, + { + "name": "tricu-lib-source-binding", + "version": "0.12.0", + "manifest": "63a040e7bd4bc3da1b1466e156d0c9762767bd71c9a44a3c37c447262c267c4e", + "hash": "692e1c2339596f3499be3497149160e7735121844d6a40c6a3ecedd4b8b20663", + "title": "lib/source/binding.tri" + }, + { + "name": "tricu-lib-source-binding-analysis", + "version": "0.12.0", + "manifest": "4b5ca357b50623070346cae49c2083dba6c28d1c9e009eff9df9d089f7a57483", + "hash": "ca65797235348b952523b11d276c054a448601df5815788540d17aadc79d4785", + "title": "lib/source/binding_analysis.tri" + }, + { + "name": "tricu-lib-source-binding-support", + "version": "0.12.0", + "manifest": "9cc7c19f46270160e254cc704d4a7c6c31cecdd287ce528f347b139112157458", + "hash": "5ffe0c3293f7fa75c99db184e50963fbdb8d08b75ece9545012f8e5ef014cc1a", + "title": "lib/source/binding_support.tri" + }, + { + "name": "tricu-lib-source-build-stable", + "version": "0.12.0", + "manifest": "69ab50002d8409ccae99ac193a9b0b2458240deabd2e6fea7ef05cbd7e7068a0", + "hash": "261f38e6d86777f58666cfa721bcb3ea68f0ff3dffbd8b5d0e6c759e551d14e2", + "title": "lib/source/build-stable.tri" + }, + { + "name": "tricu-lib-source-build", + "version": "0.12.0", + "manifest": "db88b63a10e8b2659481a628b4ed7ea1723205b121cfac99a9801d7518084d86", + "hash": "e5ccd45c3149a9e5f46de7cff8076e59c3b7d94a3a223428a2884f56dde9ce73", + "title": "lib/source/build.tri" + }, + { + "name": "tricu-lib-source-bundle", + "version": "0.12.0", + "manifest": "429e9d90706ea8f1301c398dc5b7dcdf7897f8d51cc4b6e9c580b142c598c4b1", + "hash": "c834c36fa1b984ad4d6b34fbdd784b3c1b732b1433f549b00e8df1931cf9a3b5", + "title": "lib/source/bundle.tri" + }, + { + "name": "tricu-lib-source-compile", + "version": "0.12.0", + "manifest": "fb41d71410ad8fb9c0da35a5ab0a6b782b9814bd7629737b710b7404648939cd", + "hash": "fffeb2fd3c25c6eb7fc21660eee8be391ef2a3adae58e28359d9f6920e82df1f", + "title": "lib/source/compile.tri" + }, + { + "name": "tricu-lib-source-core", + "version": "0.12.0", + "manifest": "83e1dc8052f806b19ebc737998bbdfff23211b23a6bbe2ae6adbede8ad1652a2", + "hash": "d7105ef477224dfb10ad2773e54744cb3f87ddf304eb753d7cb9ba40ea9cc3df", + "title": "lib/source/core.tri" + }, + { + "name": "tricu-lib-source-equations", + "version": "0.12.0", + "manifest": "568c5d782a847e4f8d6b7061d51d34fc527a466b872ede27032104293df3bf8f", + "hash": "982ae0c7b3fcad6764df5187b00ea3c4bc8563c6244f8bd8f12c8706bd3ab9f5", + "title": "lib/source/equations.tri" + }, + { + "name": "tricu-lib-source-export-cache", + "version": "0.12.0", + "manifest": "d937bb405fb9b40b88046e37623aee1b080a0b93a5c568aff132baeef9f44f54", + "hash": "bd98eac335b6d792fdcc58644e38b2dc063e9522c2475f78d9d51d0852af9058", + "title": "lib/source/export-cache.tri" + }, + { + "name": "tricu-lib-source-index", + "version": "0.12.0", + "manifest": "c2946fe3ac0daf1a06d6f7deab9f7ad08d679c241b04ad9c0c6d3b6038cf091d", + "hash": "1f18232479e776982515edc3fe2c0f39fad79e2b428c2ff040d92edf5441ac6a", + "title": "lib/source/index.tri" + }, + { + "name": "tricu-lib-compiler-io", + "version": "0.12.0", + "manifest": "e4757cead2d1072f68e6f2d01f8fde489b0d3fabef7733edd5e1c4b060857acc", + "hash": "5278cc3f3eddc4f1760997bff84e707ec6b9571fdaa7c3b895de7a2b22b92f35", + "title": "lib/source/io.tri" + }, + { + "name": "tricu-lib-source-lexer", + "version": "0.12.0", + "manifest": "4cc4ed214d6e474b339c970d04cc09ced20c6472758b58897aabbd6f3a5bbb42", + "hash": "b75e428ce6d587893829792a87c3a374993d22c900eea793f2713e822440cb9f", + "title": "lib/source/lexer.tri" + }, + { + "name": "tricu-lib-source-lock", + "version": "0.12.0", + "manifest": "97d9a9f670d55eec307a98766da971c1e796cff9d8325e63aa761bbc646a2f48", + "hash": "666164df3ec739d1c3d3637ec72ed9a85e9012a7c9c5f38c3bc96ebb22e3334d", + "title": "lib/source/lock.tri" + }, + { + "name": "tricu-lib-source-map", + "version": "0.12.0", + "manifest": "2355ffab43e417e9d96202b9f905eb1680985091a06f0ea0f0c0bae57547e575", + "hash": "bf72cd9abf5b237b92f2f3ecf75a95e50dec6f0d214e19bfe7c6b63debbb1ea4", + "title": "lib/source/map.tri" + }, + { + "name": "tricu-lib-source-module", + "version": "0.12.0", + "manifest": "d1d0667b5c3b717f91a4e89f06bea2686d5d54c4575e5432600b69a584b5f48a", + "hash": "beda492ecd9338eb0c75af08506edad760b914ab0c73ef055e1e1d7946821d6d", + "title": "lib/source/module.tri" + }, + { + "name": "tricu-lib-source-object", + "version": "0.12.0", + "manifest": "cf1cfb646630b6fa904524d2af75769c0133387e8b43ef8acf8fce8e73e19c5f", + "hash": "f8d0c9a8a9d15ba99853f50002b3181fad0104ddff2a01d91aa6a081c376f97a", + "title": "lib/source/object.tri" + }, + { + "name": "tricu-lib-source-order", + "version": "0.12.0", + "manifest": "1d55b1616e892be989d2c987099c84bef61686fc67f6a3eb5b1a373626b0ca5e", + "hash": "53e15c0de7a8ed6cb1454e285a08d65b0a3cd1ffad877a6f598c94afa61d21d4", + "title": "lib/source/order.tri" + }, + { + "name": "tricu-lib-source-parser", + "version": "0.12.0", + "manifest": "425b921ef62e99dd93f6d3389c82fdbb583eaeb857975717441c5469f98f3a73", + "hash": "9f63810fee2e20762f1a198535448a2187a90065a35428ec82a11aad85575643", + "title": "lib/source/parser.tri" + }, + { + "name": "tricu-lib-source-pattern", + "version": "0.12.0", + "manifest": "d14232cb623da7a59883ae5e0c773fa71037a887a7dcf3352e48cc8dff421123", + "hash": "1930e13f58f774f90a838b49128b1bcfd5a0f90a67ec779571858e001489b70c", + "title": "lib/source/pattern.tri" + }, + { + "name": "tricu-lib-source-program", + "version": "0.12.0", + "manifest": "447aa7d321344146772a2693e83b2ab87a0058e281c42780e1bb5b24e0ea995d", + "hash": "24b52c4f58744204c49b807b2af730a4800068742507f4138ba2e1a78bad0678", + "title": "lib/source/program.tri" + }, + { + "name": "tricu-lib-source-resolve", + "version": "0.12.0", + "manifest": "ed934dd01014852aa2e3734444538d0c0807da41bc661cd3965eca6ed16ceffe", + "hash": "29588b9deced8a3726d1d01c65c8d8e27bf29f4c91d4ff782c1e702492425fa6", + "title": "lib/source/resolve.tri" + }, + { + "name": "tricu-lib-source-stable", + "version": "0.12.0", + "manifest": "47d34906362fae9bf7b296524e66f36662a4ebe8b73283d3e9103199458e17af", + "hash": "107082dcff7e8653d101b2475e5a70738fb00a23b6118ea97d89117d7e38cc39", + "title": "lib/source/stable.tri" + }, + { + "name": "tricu-lib-source-staged-conditional-experiment", + "version": "0.12.0", + "manifest": "43113de593d0e70f3f94e8dafff0600d6f60b5a011d80cdc6e84166fed29b682", + "hash": "fa5e038bf32cbffd7a4afe3fe2d96115f87ea183913a01f80d44230efb8db4e7", + "title": "lib/source/staged-conditional-experiment.tri" + }, + { + "name": "tricu-lib-source-staged-list-experiment", + "version": "0.12.0", + "manifest": "c1c062475b966bd6adae0148db1751959400f59ba73c6f84ca0e561599639e98", + "hash": "6dd7ebf2bc570e60ff489da21bc5e439892da1f40f1402c5b440fbd1815ac92f", + "title": "lib/source/staged-list-experiment.tri" + }, + { + "name": "tricu-lib-source-staging-experiment", + "version": "0.12.0", + "manifest": "db8e78afce2dadd987a2e7840b1107da75d3cc9c4ac3e5cd217cf0bc2ff00790", + "hash": "e331133fc728b1cb6c0deb0438aca410d90cd5cc6d747ce12907228afaea46e4", + "title": "lib/source/staging-experiment.tri" + }, + { + "name": "tricu-lib-source-unit", + "version": "0.12.0", + "manifest": "e819c8e35eda49ea3d71fdb8a2ff0bce18b975ad20d8c302d5a9052a14f19b30", + "hash": "2c0091f90bd46c1ec0c3cb3a93a82ca942f268766aab541c90b793be233e5080", + "title": "lib/source/unit.tri" + }, + { + "name": "tricu-lib-arboricx-inspect", + "version": "0.12.0", + "manifest": "fe9b420e1e776fa1dda7b77857e322c0509ed308bb18441b76a3b03023f93468", + "hash": "f571888c5aa3f7a91e9d5d6c45c674851ea8e3598514ad8d535fd3e9056d0314", + "title": "lib/arboricx/inspect.tri" + }, + { + "name": "tricu-lib-handler-testing", + "version": "0.12.0", + "manifest": "4a7b39b868bc30f46460b5cee2bb225a9db665775353aa5c71aafa567de7881e", + "hash": "e56378259592a4867829ca5447904b30ac5e21bd496eb68ad4d872c1af973d69", + "title": "lib/handlers/testing.tri" + }, + { + "name": "tricu-lib-handler-upload", + "version": "0.12.0", + "manifest": "6acd32c1279a1889feb3bda2f8713f973beb3493107895dbba5fe3b1ad1fe1f3", + "hash": "bbfdfb86841f2984340122be73b21a39b808e6ef02232e40e8c7016f0ff68851", + "title": "lib/handlers/upload.tri" + }, + { + "name": "tricu-lib-io-objects", + "version": "0.12.0", + "manifest": "1ed153be17b754f1a058e419d84a39e2169d5d6518bb47e8ee8785b02860e424", + "hash": "bb3135842e3cebfe6bd10e0766a6711e4d46a8cf157af1dcc9f97e25795ac0a1", + "title": "lib/io/objects.tri" + }, + { + "name": "tricu-lib-packages-base", + "version": "0.12.0", + "manifest": "fa9d4df0f82cac2754fdd3e92009cb48064856ff4cc5b18f092309aef7ff5ed4", + "hash": "f9f0ab0e44f6ae39479d74c6c66a2bdaba3f40bd26781c3ec95300c2ee3c07f3", + "title": "lib/packages/base.tri" + }, + { + "name": "tricu-lib-packages-io", + "version": "0.12.0", + "manifest": "6f8add87fe39dd16c98025492360d957a4d97459631c08d0d0c10abfbec28de4", + "hash": "ae9c12c9bf2013b0c8711860a9b9dae310085dafc9c29388f6d6d3308b5f7b2b", + "title": "lib/packages/io.tri" + }, + { + "name": "tricu-lib-recursion-list", + "version": "0.12.0", + "manifest": "4c79b7ad124027147b8fddd98c2b66cfd776c36d915c95dfb1fbf9b31a51fb88", + "hash": "60afc41f04fa65130326eeed4ca9e128bee5e90c7041f9641bbf9cfe87c142cd", + "title": "lib/recursion/list.tri" + }, + { + "name": "tricu-lib-source-bundle-stable", + "version": "0.12.0", + "manifest": "a06948780686a4432f97ce0a7ab5f8ed66a535a6d5563275e5f32375a679cb59", + "hash": "3de401378f33dd8f93e9ca11c1c2bd73a458dabcd8d631a33ba17306f83d7d3b", + "title": "lib/source/bundle-stable.tri" + }, + { + "name": "tricu-lib-tools-format-tri", + "version": "0.12.0", + "manifest": "05e75a9f4d3c40db786f64820b78774566b8d51d77d11e6e1e244dad9360568e", + "hash": "48ae69290f1858d9534fe1f60f7540ecaca466b6ec1f48a208c7b73981277fef", + "title": "lib/tools/format-tri.tri" } ] } diff --git a/ext/demo-site/reference-input/examples.json b/ext/demo-site/reference-input/examples.json @@ -42,11 +42,21 @@ { "id": "text-io", "title": "Sequence text output and return a value", - "source": "!import {{io}} as IO\n!export main\n\nmain = IO.io (do IO.bind\n IO.putStr \"Hello\\n\"\n IO.pure \"done\")\n", + "source": "!import {{io@0.12.0}} as IO\n!export main\n\nmain = IO.io (do IO.onOk\n writer <- IO.stdout\n bytes <- IO.encodeUTF8 \"Hello\\n\"\n IO.writeAll writer bytes\n IO.pure \"done\")\n", "expression": "main", "output": "string", "mode": "io", "expected": "done", "terminal": "Hello\n" + }, + { + "id": "binary64-add", + "title": "Add binary64 values and export their IEEE word", + "source": "!import {{binary64@0.12.0}} as F\n!import {{base}} as B\n!export answer\n\nanswer = B.matchResult (_ _ : 0) (reply _ : F.value reply) (F.addBits 4607182418800017408 4607182418800017408)\n", + "expression": "answer", + "output": "number", + "mode": "pure", + "expected": "4611686018427387904", + "terminal": "" } ] diff --git a/ext/demo-site/reference-input/libraries.json b/ext/demo-site/reference-input/libraries.json @@ -1,16 +1,71 @@ { - "base": {"description":"Lists and strings, Booleans, checked natural arithmetic, Maybe/Result protocols and contracts.","alias":"B","usage":"`add a b`, `sub a b` (saturating), `mul a b`, `div a b`, `mod a b`, `divMod a b`, `pow a b` use naturals. Division requires a nonzero divisor. `lt? a b`, `lte? a b`, `equal? a b` return Booleans (equal? compares trees). `map f xs`, `filter predicate xs`, `foldl f initial xs`, `foldr f initial xs`: both folds pass accumulator first, element second. `append xs ys` concatenates lists, including strings. `intercalate separator strings` joins between fields; `joinSuffix separator strings` adds a separator after every field. `take n xs`, `drop n xs`, `reverse xs`, `length xs`, `sum xs` handle lists. `lazyBool thenThunk elseThunk condition` calls the selected thunk with t. `matchBool onTrue onFalse condition` chooses a value. `matchResult onError onSuccess result` calls either handler with two arguments: diagnostic/value and remainder. Contract failures produce Results; successful checked arithmetic produces an ordinary natural."}, - "native-math": {"description":"Compact natural arithmetic, ordering and ASCII classification.","alias":"N","usage":"`add a b`, `subtract a b` (saturating), `multiply a b`, `quotient a b`, `remainder a b`, `power a b`; `divMod a b` returns `t quotient remainder`. `equal a b`, `lt a b`, `lte a b`, `gt a b`, `gte a b`, `zero n`, `even n`, `odd n` return Booleans. Inputs must be canonical naturals. Raw `divMod a 0` returns `t 0 a`; use base's checked division at external boundaries. `compare a b` returns t for equal, t t for less, t t t for greater. `successor n`, `predecessor n`, `minimum a b`, `maximum a b` are natural operations. See source for character-classification bounds."}, - "conversions": {"description":"Decimal text formatting for natural numbers.","alias":"C","usage":"`showNumber n` converts a canonical natural to an ASCII decimal character list, including \"0\". Display it as Text. Its input contract reports malformed values as Results."}, - "prelude": {"description":"Combined public interfaces of base, bytes and conversions.","alias":"P","usage":"Reexports base, bytes and conversions. Use their calling conventions with this module's qualifier, for example `P.showNumber 42` or `P.map f xs`. Reexported executable trees are included in the bundle."}, - "bytes": {"description":"Byte-oriented string helpers and codecs.","alias":"Bytes"}, - "io": {"description":"Host-interpreted interaction trees, sequencing and effect helpers.","alias":"IO","usage":"Wrap a final action with `IO.io action`. `IO.pure value` returns a value; `IO.bind action (value : nextAction)` sequences; `IO.putStr text` writes a character list; `IO.getLine` reads one line. `IO.abortIO diagnostic` aborts. Select Text / line IO for these wrapped actions. The browser supports these core actions; file, socket, concurrency and other host actions need the native host and its permissions. `do IO.bind` is explicit sequencing syntax; finish with an action such as `IO.pure value`. See the host ABI and IO source for Result-aware helper conventions."}, - "patterns": {"description":"Predicate-based matching and conditional dispatch.","alias":"Patterns","usage":"`match value rows` uses exact two-element `[predicate action]` rows. `cond rows` uses `guard predicateThunk actionThunk` pairs; thunks receive t. Check source for row shape and fallthrough behavior."}, - "parser": {"description":"Parser combinators with positioned diagnostics, commitment and rollback.","alias":"Parser"}, - "lexer": {"description":"Positioned character scans and first-match lexical dispatch.","alias":"Lexer"}, - "graph": {"description":"Dependency ordering and cycle reporting for caller-validated graphs.","alias":"Graph"}, - "http": {"description":"HTTP request/response parsing, formatting and Result protocols.","alias":"HTTP"}, - "socket": {"description":"Native-host socket action constructors.","alias":"Socket"}, - "binary": {"description":"Binary encodings and decoding helpers.","alias":"Binary"}, - "intensional": {"description":"Contracts and structural inspection of executable trees.","alias":"Intensional"} + "base": { + "description": "Lists and strings, Booleans, checked natural arithmetic, Maybe/Result protocols and contracts.", + "alias": "B", + "usage": "`add a b`, `sub a b` (saturating), `mul a b`, `div a b`, `mod a b`, `divMod a b`, `pow a b` use naturals. Division requires a nonzero divisor. `lt? a b`, `lte? a b`, `equal? a b` return Booleans (equal? compares trees). `map f xs`, `filter predicate xs`, `foldl f initial xs`, `foldr f initial xs`: both folds pass accumulator first, element second. `append xs ys` concatenates lists, including strings. `intercalate separator strings` joins between fields; `joinSuffix separator strings` adds a separator after every field. `take n xs`, `drop n xs`, `reverse xs`, `length xs`, `sum xs` handle lists. `lazyBool thenThunk elseThunk condition` calls the selected thunk with t. `matchBool onTrue onFalse condition` chooses a value. `matchResult onError onSuccess result` calls either handler with two arguments: diagnostic/value and remainder. Contract failures produce Results; successful checked arithmetic produces an ordinary natural." + }, + "native-math": { + "description": "Compact natural arithmetic, ordering and ASCII classification.", + "alias": "N", + "usage": "`add a b`, `subtract a b` (saturating), `multiply a b`, `quotient a b`, `remainder a b`, `power a b`; `divMod a b` returns `t quotient remainder`. `equal a b`, `lt a b`, `lte a b`, `gt a b`, `gte a b`, `zero n`, `even n`, `odd n` return Booleans. Inputs must be canonical naturals. Raw `divMod a 0` returns `t 0 a`; use base's checked division at external boundaries. `compare a b` returns t for equal, t t for less, t t t for greater. `successor n`, `predecessor n`, `minimum a b`, `maximum a b` are natural operations. See source for character-classification bounds." + }, + "conversions": { + "description": "Decimal text formatting for natural numbers.", + "alias": "C", + "usage": "`showNumber n` converts a canonical natural to an ASCII decimal character list, including \"0\". Display it as Text. Its input contract reports malformed values as Results." + }, + "prelude": { + "description": "Combined public interfaces of base, bytes and conversions.", + "alias": "P", + "usage": "Reexports base, bytes and conversions. Use their calling conventions with this module's qualifier, for example `P.showNumber 42` or `P.map f xs`. Reexported executable trees are included in the bundle." + }, + "bytes": { + "description": "Byte-oriented string helpers and codecs.", + "alias": "Bytes" + }, + "io": { + "description": "Structured host-interpreted interaction trees, sequencing and effect helpers.", + "alias": "IO", + "usage": "`IO.io action` wraps a version-2 interaction. `IO.pure value` returns a value; `IO.bind action next` sequences; `IO.onOk action next` sequences successful Result payloads. `IO.stdout` obtains the standard writer; `IO.encodeUTF8 text` produces bytes; `IO.writeAll writer bytes` writes them. `do IO.onOk` composes these checked requests. Browser execution uses the structured terminal; native execution uses OS process authority. See the host ABI for facility versions, resources, cancellation and effects.", + "version": "0.12.0" + }, + "patterns": { + "description": "Predicate-based matching and conditional dispatch.", + "alias": "Patterns", + "usage": "`match value rows` uses exact two-element `[predicate action]` rows. `cond rows` uses `guard predicateThunk actionThunk` pairs; thunks receive t. Check source for row shape and fallthrough behavior." + }, + "parser": { + "description": "Parser combinators with positioned diagnostics, commitment and rollback.", + "alias": "Parser" + }, + "lexer": { + "description": "Positioned character scans and first-match lexical dispatch.", + "alias": "Lexer" + }, + "graph": { + "description": "Dependency ordering and cycle reporting for caller-validated graphs.", + "alias": "Graph" + }, + "http": { + "description": "HTTP request/response parsing, formatting and Result protocols.", + "alias": "HTTP" + }, + "socket": { + "description": "Native-host socket action constructors.", + "alias": "Socket" + }, + "binary": { + "description": "Binary encodings and decoding helpers.", + "alias": "Binary" + }, + "intensional": { + "description": "Contracts and structural inspection of executable trees.", + "alias": "Intensional" + }, + "binary64": { + "version": "0.12.0", + "description": "Pure Tree Calculus binary64 arithmetic with nearest-even rounding and explicit IEEE exception flags.", + "alias": "F", + "usage": "`fromBits word` returns a checked Result containing a private Value; `fromBitsC word remainder` composes with base contracts. Words are canonical naturals in 0..2^64-1 containing exact IEEE bits. `toBits value` exports exactly. `add`, `subtract`, `multiply`, and `divide` take Values and return `(Value, Flags)`; `value reply` and `flags reply` project the pair. `addBits`, `subtractBits`, `multiplyBits`, and `divideBits` take Words and return `Result (Word, Flags)`. Unwrap Results with base.matchResult or base.bindResult. Each operation rounds separately. `mergeFlags` ORs flag sets; `invalid`, `divideByZero`, `overflow`, `underflow`, and `inexact` inspect them. Arithmetic NaNs and infinities are successful results; malformed Words are contract errors. See the binary64 guide for NaN selection and after-rounding tininess." + } } diff --git a/ext/demo-site/reference.py b/ext/demo-site/reference.py @@ -52,7 +52,8 @@ def generate(root, output): bundle = site / 'bundles' / (release['hash'] + '.arboricx') assert hashlib.sha256(bundle.read_bytes()).hexdigest() == release['hash'] names = list(read(bundle)[3]) - note = notes.get(short, {}) if release['version'] == '0.1.0' else {} + note = notes.get(short, {}) + note = note if release['version'] == note.get('version', '0.1.0') else {} alias = note.get('alias', ''.join(word.capitalize() for word in short.split('-'))) description = note.get('description', f'{short.replace("-", " ").capitalize()} library; inspect its complete interface and source reference below.') filename = release['name'] + '-' + release['version'] + '.md' @@ -91,6 +92,7 @@ def generate(root, output): # Examples pin explicit release versions; adding a publication cannot silently # change their program meaning or independent expected results. pins = {r['name'].removeprefix('tricu-lib-'): r['manifest'] for r in rows if r['version'] == '0.1.0'} + pins.update({r['name'].removeprefix('tricu-lib-') + '@' + r['version']: r['manifest'] for r in rows}) examples = json.loads((site / 'reference-input/examples.json').read_text()) for example in examples: example['source'] = re.sub(r'\{\{([^}]+)\}\}', lambda m: pins[m[1]], example['source']) diff --git a/ext/demo-site/test/import-picker-probe.mjs b/ext/demo-site/test/import-picker-probe.mjs @@ -7,9 +7,10 @@ async function wait(fn,label){for(let i=0;i<4500;i++){if(fn())return;await delay const status=value=>wait(()=>el('status').textContent===value,value); export async function run(control,backend='haskell-wasm'){ const base=new URL('../',document.querySelector('script[type=module][src]').src); - const {createRuntimeSession}=(await import(new URL('dist/probe-api.js',base))).runtimeSession; + const api=await import(new URL('dist/probe-api.js',base)); + const {createRuntimeSession}=api.runtimeSession; const catalogue=await(await fetch(new URL('reference/libraries.json',base))).json(); - const lib=name=>catalogue.releases.find(r=>r.name==='tricu-lib-'+name&&r.version==='0.3.0'); + const lib=name=>catalogue.releases.find(r=>r.name==='tricu-lib-'+name&&r.version==='0.12.0'); const math=lib('native-math'),foundation=lib('base'); // Explicit dependencies adapt the user's divisor-first mod helper without // changing the FizzBuzz/range/map program under test. @@ -50,7 +51,14 @@ outside = zeros 4097`; try{ for(const example of examples){ let terminal='';await session.compile(example.source,'empty'); - const result=await session.runExpression(example.expression,example.output,example.mode,{...host,write:text=>{terminal+=text;}}); + const parent=document.createElement('div');let widget; + const exampleHost={...host,write:text=>{terminal+=text;},structured:{ + open(run,command){widget=api.ioTerminalView.terminalView(parent,run,reply=>command({run,kind:'reply',reply}),()=>command({run,kind:'stop'}));}, + event(event){assert(event.kind!=='read','Documented example supplies all input '+example.id);widget.handle(event);}, + close(_run,settled){assert(settled,'Documented IO cleanup '+example.id);widget.finish();terminal=new TextDecoder('utf-8',{fatal:true}).decode(Uint8Array.from(widget.snapshot().output.bytes));}, + }}; + let result;try{result=await session.runExpression(example.expression,example.output,example.mode,exampleHost);} + catch(error){throw Error('Documented example '+example.id+': '+error.message);} assert(result.value===example.expected,'Documented result '+example.id+': '+JSON.stringify(result)); assert(terminal===example.terminal,'Documented terminal '+example.id); } @@ -92,7 +100,7 @@ outside = zeros 4097`; assert(card.querySelector('button').getAttribute('aria-label')==='Close definition inspection','Compact close remains accessible'); inspectButton('greeting').click();assert(document.querySelector('.definition-card').hidden,'Second glyph click closes, not cycles'); inspectButton('greeting').click();await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','reopen Auto'); - assert(el('terminal').textContent==='','Inspection never runs IO'); + assert(el('terminal-io').textContent==='','Inspection leaves structured IO idle'); interpretation('number');await wait(()=>document.querySelector('.definition-card [role=status]').textContent.includes('Cannot interpret'),'invalid view'); interpretation('string');await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','view recovery'); document.querySelector('.definition-card button').click(); @@ -133,12 +141,12 @@ outside = zeros 4097`; assert(el('import-title').textContent==='native-math','Search reaches native math'); assert(globalThis.__sourceEditor.getSource()===original,'Browsing preserves draft'); assert(el('import-preview').textContent===`!import ${math.manifest} as N`,'Exact full manifest preview: '+el('import-preview').textContent); - assert(el('import-version').value==='0.3.0','Newest version initially selected'); + assert(el('import-version').value==='0.12.0','Newest version initially selected'); assert(el('import-version').options.length>=2,'History available in details: '+[...el('import-version').options].map(o=>o.value)); input('import-alias','Numbers');change('import-version','0.1.0');await wait(()=>!el('insert-import').disabled,'historical release check'); assert(el('import-version').value==='0.1.0'&&el('import-preview').textContent.endsWith('as Numbers'),'History preserves chosen namespace'); assert(el('import-usage').textContent.includes('multiply')&&el('import-example').textContent.includes('Expected result: 42'),'Calling conventions and tested example available inline'); - change('import-version','0.3.0');input('import-alias','N'); + change('import-version','0.12.0');input('import-alias','N'); await wait(()=>!el('insert-import').disabled,'candidate compiled'); el('insert-import').click(); assert(!el('import-dialog').open,'Insertion closes dialog');