Repository navigation
Adds a guide to running a statement program - #211
Merged
Merged
Conversation
A how-to page under docs/guides: compile a renewal script, execute it for a loan and read back the loan it leaves, ask executeValue for the last expression's value, and handle a script that fails, with the result each step shows. The README's Documentation map links it under Do in place of the Statement programs line, which moves to Look up, where its reference text belongs. Refs: pts-1tr8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A how-to page,
docs/guides/how-to-run-a-statement-program.md: compile a renewal script withcompileProgram, execute it for a loan withexecuteand read back the loan it leaves, askexecuteValuefor the last expression's value, and handle a script that fails. Every example is in the library loan.The README's Documentation map links the page under Do, in place of the "Statement programs" line that pointed the Do reader at a reference section. That line moves to Look up with a description of what the section holds, the shape the host functions guide took. No other README text changes, and no file under
src/changes.Source
The docs audit names no span for this subject (its next action for this repository is about the Install section), so the page is written from the README's "Statement programs" reference section and the doc comments on
compileProgram,executeandexecuteValue, and that section stays where it is.Title
The title "How to run a statement program" is the one the bead's acceptance dictates, kept as given. "run" in it is a verb; it is the page's only use of the word.
Result lines
The suite does not read
docs/guides/, so no result line on the page is executed by the suite. Each one was executed by hand againstsrc/on this branch, with assertions, before the commit:compiled.okistruecompiled.instructionsstarts["load", "loan"], ["access", "renewals"], ["lit", 2]"unassignable_location"at{ line: 1, column: 19 }{ loan: { renewals: 2, days_left: 17 } }loan.renewalsis still1status: "refused"executeValueanswers17days_leftfails as"TypeMismatchError"with reason"add"{ loan: { renewals: 2 } }Checks
mise exec -- pnpm run gate) green on this tree;README.mdis a gated path, so the gate ran.README.md: 1170 lines, every part present.changelog.d/README.mdexcludes documentation.