doc(frontend): Update documentation for `frontend.process`

This commit is contained in:
Leni Aniva 2025-03-14 20:07:31 -07:00
parent 98ad1ae283
commit 78485ae6e2
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 6 additions and 6 deletions

View File

@ -346,10 +346,9 @@ structure FrontendProcess where
-- One of these two must be supplied: Either supply the file name or the content.
fileName?: Option String := .none
file?: Option String := .none
-- If set to true, read the header (otherwise discards the header)
-- Whether to read the header
readHeader : Bool := false
-- If set to true, Pantograph's environment will be altered to whatever is
-- after the compilation units.
-- Alter the REPL environment after the compilation units.
inheritEnv : Bool := false
-- collect tactic invocations
invocations: Bool := false

View File

@ -46,14 +46,15 @@ See `Pantograph/Protocol.lean` for a description of the parameters and return va
Save/Load a goal state to/from a file. The environment is not carried with the
state. The user is responsible to ensure the sender/receiver instances share
the same environment.
* `frontend.process { ["fileName": <fileName>,] ["file": <str>], invocations:
* `frontend.process { ["fileName": <fileName>,] ["file": <str>], readHeader: <bool>, inheritEnv: <bool>, invocations:
<bool>, sorrys: <bool>, typeErrorsAsGoals: <bool>, newConstants: <bool> }`:
Executes the Lean frontend on a file, collecting the tactic invocations
(`"invocations": true`), the sorrys and type errors into goal states
(`"sorrys": true`), and new constants (`"newConstants": true`). In the case of
`sorrys`, this command additionally outputs the position of each captured
`sorry`. Warning: Behaviour is unstable in case of multiple `sorry`s. Use the
draft tactic if possible.
`sorry`. Conditionally inherit the environment from executing the file.
Warning: Behaviour is unstable in case of multiple `sorry`s. Use the draft
tactic if possible.
## Errors