Skip to content

Commit 6592fd3

Browse files
committed
deprecations and test output
1 parent ddba321 commit 6592fd3

6 files changed

+15
-11
lines changed

REPL/Frontend.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def processCommandsWithInfoTrees
2020
(commandState : Command.State) : IO (Command.State × List Message × List InfoTree) := do
2121
let commandState := { commandState with infoState.enabled := true }
2222
let s ← IO.processCommands inputCtx parserState commandState <&> Frontend.State.commandState
23-
let msgs := s.messages.msgs.toList.drop commandState.messages.msgs.size
23+
let msgs := s.messages.toList.drop commandState.messages.toList.length
2424
let trees := s.infoState.trees.toList.drop commandState.infoState.trees.size
2525

2626
pure (s, msgs, trees)

REPL/Main.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ def runCommand (s : Command) : M IO (CommandResponse ⊕ Error) := do
208208
let cmdSnapshot :=
209209
{ cmdState
210210
cmdContext := (cmdSnapshot?.map fun c => c.cmdContext).getD
211-
{ fileName := "", fileMap := default, tacticCache? := none, snap? := none } }
211+
{ fileName := "",
212+
fileMap := default,
213+
tacticCache? := none,
214+
snap? := none,
215+
cancelTk? := none } }
212216
let env ← recordCommandSnapshot cmdSnapshot
213217
let jsonTrees := match s.infotree with
214218
| some "full" => trees

REPL/Snapshots.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ open Lean Elab Tactic
116116
/-- New messages in a `ProofSnapshot`, relative to an optional previous `ProofSnapshot`. -/
117117
def newMessages (new : ProofSnapshot) (old? : Option ProofSnapshot := none) : List Lean.Message :=
118118
match old? with
119-
| none => new.coreState.messages.msgs.toList
120-
| some old => new.coreState.messages.msgs.toList.drop (old.coreState.messages.msgs.size)
119+
| none => new.coreState.messages.toList
120+
| some old => new.coreState.messages.toList.drop (old.coreState.messages.toList.length)
121121

122122
/-- New info trees in a `ProofSnapshot`, relative to an optional previous `ProofSnapshot`. -/
123123
def newInfoTrees (new : ProofSnapshot) (old? : Option ProofSnapshot := none) : List InfoTree :=

test/name_generator.expected.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"goals": []}
2525

2626
{"traces":
27-
["[Meta.Tactic.simp.rewrite] @gt_iff_lt:1000, x > 0 ==> 0 < x",
27+
["[Meta.Tactic.simp.rewrite] gt_iff_lt:1000, x > 0 ==> 0 < x",
2828
"[Meta.Tactic.simp.rewrite] h0:1000, 0 < x ==> True"],
2929
"proofState": 6,
3030
"goals": []}
3131

3232
{"traces":
33-
["[Meta.Tactic.simp.rewrite] @gt_iff_lt:1000, x > 0 ==> 0 < x",
33+
["[Meta.Tactic.simp.rewrite] gt_iff_lt:1000, x > 0 ==> 0 < x",
3434
"[Meta.Tactic.simp.rewrite] h0:1000, 0 < x ==> True"],
3535
"proofState": 7,
3636
"goals": []}

test/no_goal_sorry.expected.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"endPos": {"line": 2, "column": 18},
55
"data": "type expected, got\n (set Nat : ?m.8 PUnit)"},
66
{"severity": "error",
7-
"pos": {"line": 3, "column": 2},
8-
"endPos": {"line": 3, "column": 7},
9-
"data": "no goals to be solved"}],
7+
"pos": {"line": 2, "column": 22},
8+
"endPos": {"line": 2, "column": 24},
9+
"data": "Case tag 'body' not found.\n\nThere are no cases to select."}],
1010
"env": 0}
1111

test/trace_simp.expected.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"pos": {"line": 1, "column": 23},
1010
"endPos": {"line": 1, "column": 27},
1111
"data":
12-
"[Meta.Tactic.simp.rewrite] f_def:1000, f ==> 37\n[Meta.Tactic.simp.rewrite] @eq_self:1000, 37 = 37 ==> True"}],
12+
"[Meta.Tactic.simp.rewrite] f_def:1000, f ==> 37\n[Meta.Tactic.simp.rewrite] eq_self:1000, 37 = 37 ==> True"}],
1313
"env": 3}
1414

1515
{"sorries":
@@ -28,7 +28,7 @@
2828

2929
{"traces":
3030
["[Meta.Tactic.simp.rewrite] f_def:1000, f ==> 37",
31-
"[Meta.Tactic.simp.rewrite] @eq_self:1000, 37 = 37 ==> True"],
31+
"[Meta.Tactic.simp.rewrite] eq_self:1000, 37 = 37 ==> True"],
3232
"proofState": 2,
3333
"goals": []}
3434

0 commit comments

Comments
 (0)