Extends Lean's incremental reporting and reuse between commands into various steps inside declarations: * headers and bodies of each (mutual) definition/theorem * `theorem ... := by` for each contained tactic step, including recursively inside supported combinators currently consisting of * `·` (cdot), `case`, `next` * `induction`, `cases` * macros such as `next` unfolding to the above  *Incremental reuse* means not recomputing any such steps if they are not affected by a document change. *Incremental reporting* includes the parts seen in the recording above: the progress bar and messages. Other language server features such as hover etc. are *not yet* supported incrementally, i.e. they are shown only when the declaration has been fully processed as before. --------- Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
46 lines
989 B
Text
46 lines
989 B
Text
|
|
|
|
structure Foo := (n : Nat)
|
|
|
|
def Foo.sum (xs : List Foo) : Foo :=
|
|
xs.foldl (λ s x => ⟨s.n + x.n⟩) ⟨0⟩
|
|
|
|
/--
|
|
info: let x1 := { n := 1 };
|
|
let x2 := { n := 2 };
|
|
let x3 := { n := 3 };
|
|
let x5 := { n := 5 };
|
|
let x6 := { n := 6 };
|
|
Foo.sum [x1, x2, x3, x5, x6] : Foo
|
|
-/
|
|
#guard_msgs in
|
|
#check
|
|
let x1 := ⟨1⟩
|
|
let x2 := ⟨2⟩
|
|
let x3 := ⟨3⟩
|
|
-- let x4 := ⟨4⟩; -- If this line is uncommented we get the error at `⟨`
|
|
let x5 := ⟨5⟩
|
|
let x6 := ⟨6⟩
|
|
Foo.sum [x1, x2, x3, x5, x6]
|
|
|
|
/--
|
|
error: invalid constructor ⟨...⟩, expected type must be an inductive type ⏎
|
|
?m.441
|
|
---
|
|
info: let x1 := { n := 1 };
|
|
let x2 := { n := 2 };
|
|
let x3 := { n := 3 };
|
|
let x4 := ?m.445 x1 x2 x3;
|
|
let x5 := { n := 5 };
|
|
let x6 := { n := 6 };
|
|
Foo.sum [x1, x2, x3, x5, x6] : Foo
|
|
-/
|
|
#guard_msgs in
|
|
#check
|
|
let x1 := ⟨1⟩
|
|
let x2 := ⟨2⟩
|
|
let x3 := ⟨3⟩
|
|
let x4 := ⟨4⟩; -- If this line is uncommented we get the error at `⟨`
|
|
let x5 := ⟨5⟩
|
|
let x6 := ⟨6⟩
|
|
Foo.sum [x1, x2, x3, x5, x6]
|