File tree 4 files changed +23
-9
lines changed
4 files changed +23
-9
lines changed Original file line number Diff line number Diff line change
1
+ import Lean
2
+
3
+ namespace List
4
+
5
+ def flatten : List (List α) → List α
6
+ | [] => []
7
+ | a :: as => a ++ flatten as
8
+
9
+ def flatMap {α : Type u} {β : Type v} (a : List α) (b : α → List β) : List β := flatten (map b a)
10
+
11
+ end List
Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ Authors: Scott Morrison
6
6
import Lean.Data.Json
7
7
import Lean.Message
8
8
import Lean.Elab.InfoTree.Main
9
+ import REPL.Future
10
+
9
11
10
12
open Lean Elab InfoTree
11
13
14
+
12
15
namespace REPL
13
16
14
17
structure CommandOptions where
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Scott Morrison
5
5
-/
6
6
import Lean
7
-
7
+ import REPL.Future
8
8
/-!
9
9
Additional functions to deal with `InfoTree`.
10
10
-/
@@ -214,13 +214,13 @@ def sorries (t : InfoTree) : List (ContextInfo × SorryType × Position × Posit
214
214
215
215
def tactics (t : InfoTree) : List (ContextInfo × Syntax × List MVarId × Position × Position × Array Name) :=
216
216
-- HACK: creating a child ngen
217
- t.findTacticNodes.map fun ⟨i, ctx⟩ =>
218
- let range := stxRange ctx.fileMap i.stx
219
- ( { ctx with mctx := i.mctxBefore, ngen := ctx.ngen.mkChild.1 },
220
- i.stx,
221
- i.goalsBefore,
222
- range.fst,
223
- range.snd,
217
+ t.findTacticNodes.map fun ⟨i, ctx⟩ =>
218
+ let range := stxRange ctx.fileMap i.stx
219
+ ( { ctx with mctx := i.mctxBefore, ngen := ctx.ngen.mkChild.1 },
220
+ i.stx,
221
+ i.goalsBefore,
222
+ range.fst,
223
+ range.snd,
224
224
i.getUsedConstantsAsSet.toArray )
225
225
226
226
Original file line number Diff line number Diff line change 1
- leanprover/lean4:v4.14.0-rc1
1
+ leanprover/lean4:v4.13.0
You can’t perform that action at this time.
0 commit comments