Literate MoonBit semantic docs
This single-file example is intentionally written as a small literate document. The prose stays as Markdown, while only mbt check fences are compiled and annotated with semantic hover and definition data.
answer is defined in the first checked block.
doubled is defined later and reused from the test block.
- References to
@ref.Ref, inspect, and content should resolve into core library definitions.
Plain Markdown between checked blocks should render as prose, not as code. A non-MoonBit code fence should also remain plain and should not receive semantic links:
text
33answer() and @ref.Ref[Int] are text here, not MoonBit references.
The following block is checked together with the earlier one, so answer can be called across Markdown boundaries.