Guide
Runnable route map
Each section names one Yichus mechanism and links to a generated demo, worked explanation, or command you can run. Yichus compiles Bosatsu, a small total language with declared effects. For Bosatsu language syntax and fundamentals, use the Bosatsu docs rather than this page.
Yichus compiles Bosatsu into application and analysis surfaces
Yichus is a Bosatsu application focused on provenance-aware simulation and UI workflows.
The useful distinction is that Bosatsu supplies the language and compiler, while Yichus adds generated UIs, simulations, and static analysis over the compiled program. Start with the CLI quick start for build and setup context.
Generate and run the compiled counter UI
The counter is the shortest route through Bosatsu source, Yichus UI generation, and browser event dispatch. Run the generated counter, then use the linked quick start above to generate the same page locally.
- Generate a counter with
yichus sim - Render with
Yichus/UI - Inspect update behavior in the browser
Trace UI state through deferred IO
UI handlers return effects; the runtime executes those effects at the event boundary. The IO values walkthrough shows the execution path and the distinction between constructing an effect and running it.
- Use
Yichus/IOfor state reads/writes - Keep handlers as IO-returning functions
- Preserve deferred-effect semantics
Generate a calculator from compute and simulation configuration
A simulation pairs a pure compute package with configuration that declares its controls and outputs. Run the generated deadweight-loss calculator or use the calculator catalog for more examples.
- Pair compute model with
.sim.bosatsuconfig - Define inputs, outputs, assumptions, and sweeps
- Generate app with
yichus simapp
Inspect a value's static provenance
Use derivation traces to explain output values and map them back to source decisions.
Read the provenance walkthrough for the terms, limitations, and a worked route from an output to its inputs.
Query typed Matchless structure with Explorer
Matchless is Bosatsu's compiled typed IR. Explorer walks that structure to inspect bindings, dependencies, and IO vs pure boundaries. It does not execute the target program.
Follow the Explorer command guide for copyable queries, or open the browser playground to compare structural results without local setup.
Run a compiled canvas animation
Use Yichus/Canvas for runtime visual demos like particles and bouncing ball.
Run the compiled particles fixture, then read the canvas walkthrough for its source and runtime context.
Export Matchless IR with IO analysis
The export writes the typed Matchless tree and an analysis sidecar for tools that need structural IO facts. Run the command below from a built checkout, then use the quick start if you need the assembly and command setup.
- Run
yichus matchless --format both --output out your-file.bosatsu - Inspect
out.matchless.analysis.jsonfor IO sites, causal edges, and sequence groups - Use per-binding purity and dependency summaries to audit effect boundaries quickly
Where this fits
What this is about: How IO values are built and run