Semantic Diff

#8636 Developer playground: compare Lambda before and after optimization

3 commits, rendered from their records.

Summary

RangeCommitsChangelogAreasJS output changesFormatsFailed checks
58f1bd223b455d60990dbce94b77720644f98bf9..pr-86363๐Ÿ  Internal0none5

Changelog draft

๐Ÿ  Internal
  • Add before/after optimization views and inline diffs to the developer playground's Lambda tab, with optimized Lambda output in playground API v9. #8636

Files changed by more than one commit

CHANGELOG.mdf7d55d473, 0dbdd015b
packages/dev-playground/package.jsonf7d55d473, e33b9658b
packages/dev-playground/scripts/lambda-diff.test.mjsf7d55d473, e33b9658b
packages/dev-playground/src/LambdaDiff.resf7d55d473, e33b9658b
packages/dev-playground/src/LambdaInlineDiff.resf7d55d473, e33b9658b
packages/dev-playground/src/LambdaView.resf7d55d473, e33b9658b
packages/dev-playground/src/Main.resf7d55d473, e33b9658b

58f1bd223b455d60990dbce94b77720644f98bf9..pr-8636

f7d55d473 ยท Florian Hammerschmidt ยท Sep 09, 2026

Developer playground: Add lambda views before and after optimisation, including diffs

15 files ยท +929 โˆ’19 ยท changelog 1 ยท lambda 2 ยท compiler 1 ยท playground 10 ยท other 1
MCHANGELOG.md+1โˆ’0
Mcompiler/core/lam_compile_main.ml+5โˆ’1
Mcompiler/core/lam_compile_main.mli+4โˆ’0
Mcompiler/jsoo/jsoo_playground_main.ml+22โˆ’3
Mpackages/dev-playground/package.json+1โˆ’1
Apackages/dev-playground/scripts/lambda-diff.test.mjs+241โˆ’0
Mpackages/dev-playground/src/Bindings.res+1โˆ’0
Mpackages/dev-playground/src/CompilerApi.res+13โˆ’1
Mpackages/dev-playground/src/CompilerApi.resi+1โˆ’0
Apackages/dev-playground/src/LambdaDiff.res+161โˆ’0
Apackages/dev-playground/src/LambdaInlineDiff.res+220โˆ’0
Apackages/dev-playground/src/LambdaView.res+116โˆ’0
Mpackages/dev-playground/src/Main.res+22โˆ’13
Mpackages/dev-playground/src/styles.css+100โˆ’0
Mpackages/playground/playground_test.cjs+21โˆ’0
0dbdd015b ยท Florian Hammerschmidt ยท Sep 09, 2026

Changelog

๐Ÿ  Internal
๐Ÿ  InternalAdd before/after optimization views and inline diffs to the developer playground's Lambda tab, with optimized Lambda output in playground API v9. #8636
2 files ยท +1 โˆ’1 ยท changelog 2
MCHANGELOG.md+0โˆ’1
Achanges/developer-playground-lambda-diff.internal.md+1โˆ’0
e33b9658b ยท Florian Hammerschmidt ยท Oct 14, 2026

Cache playground Lambda diffs and bound token work by block

Keep the Lambda view mounted, cache its rendered comparison by input text, and render collapsed context only when expanded. Preserve expansion for unchanged regions across edits.

Count shared edges once in the line budget, prioritize atoms in token alignment, and admit whole changed blocks before charging the shared token budget. Cover the algorithm and rendering regressions, and document the API v9 capture boundary.

8 files ยท +296 โˆ’69 ยท docs 1 ยท playground 7
MCONTRIBUTING.md+12โˆ’0
Mpackages/dev-playground/package.json+1โˆ’1
Mpackages/dev-playground/scripts/lambda-diff.test.mjs+129โˆ’1
Apackages/dev-playground/scripts/runtime-loader.mjs+10โˆ’0
Mpackages/dev-playground/src/LambdaDiff.res+11โˆ’3
Mpackages/dev-playground/src/LambdaInlineDiff.res+20โˆ’11
Mpackages/dev-playground/src/LambdaView.res+93โˆ’36
Mpackages/dev-playground/src/Main.res+20โˆ’17