File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ Commands may be of the form
2121```
2222
2323``` json
24- { "cmd" : " example : f = 2 := rfl" , "env" : 1 , "gc " : true }
24+ { "cmd" : " example : f = 2 := rfl" , "env" : 1 , "discardCmd " : true }
2525```
2626
2727The input includes:
2828* A required ` cmd ` field containing the Lean command to execute
2929* An optional ` env ` field specifying a previous environment ID to build upon
30- * An optional ` gc ` field (default: false) to discard the environment after execution
30+ * An optional ` discardCmd ` field (default: false) to discard the environment after execution
3131* Optional fields for additional information:
3232 * ` allTactics ` : when true, includes all tactic steps in the response
3333 * ` rootGoals ` : when true, includes root goals as sorries
@@ -46,7 +46,7 @@ You can backtrack simply by using earlier values for `env`.
4646The response includes:
4747* A numeric label for the ` Environment ` after your command,
4848 which you can use as the starting point for subsequent commands.
49- This will be ` none ` if ` gc ` was enabled.
49+ This will be ` none ` if ` discardCmd ` was enabled.
5050* Any messages generated while processing your command.
5151* A list of the ` sorry ` s in your command, including
5252 * their expected type, and
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ structure CommandOptions where
2323/-- Run Lean commands.
2424If `env = none`, starts a new session (in which you can use `import`).
2525If `env = some n`, builds on the existing environment `n`.
26- Setting `gc = true` will discard the environment after execution, useful for memory management.
27- When `gc = true`, the response's `env` field will be `none`.
26+ Setting `discardCmd = true` will discard the environment after execution, useful for memory management.
27+ When `discardCmd = true`, the response's `env` field will be `none`.
2828-/
2929structure Command extends CommandOptions where
3030 env : Option Nat
3131 cmd : String
32- gc : Option Bool := false
32+ discardCmd : Option Bool := false
3333deriving ToJson, FromJson
3434
3535/-- Process a Lean file in a fresh environment. -/
Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ def runCommand (s : Command) : M IO (CommandResponse ⊕ Error) := do
322322 fileMap := default,
323323 snap? := none,
324324 cancelTk? := none } }
325- let env ← match s.gc with
325+ let env ← match s.discardCmd with
326326 | some true => pure none
327327 | _ => do
328328 let id ← recordCommandSnapshot cmdSnapshot
You can’t perform that action at this time.
0 commit comments