From 78485ae6e23ee1d5a4e2bb15c610b5543c2535d3 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 14 Mar 2025 20:07:31 -0700 Subject: [PATCH] doc(frontend): Update documentation for `frontend.process` --- Pantograph/Protocol.lean | 5 ++--- doc/repl.md | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Pantograph/Protocol.lean b/Pantograph/Protocol.lean index 164b72a..7924db7 100644 --- a/Pantograph/Protocol.lean +++ b/Pantograph/Protocol.lean @@ -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 diff --git a/doc/repl.md b/doc/repl.md index a86c01b..93eb6ab 100644 --- a/doc/repl.md +++ b/doc/repl.md @@ -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": ,] ["file": ], invocations: +* `frontend.process { ["fileName": ,] ["file": ], readHeader: , inheritEnv: , invocations: , sorrys: , typeErrorsAsGoals: , newConstants: }`: 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