fix: pretty-printing match dependent on let
This commit is contained in:
parent
54473ad523
commit
894dc0e1b8
3 changed files with 13 additions and 1 deletions
|
|
@ -311,7 +311,8 @@ structure AppMatchState where
|
|||
private partial def delabPatterns (st : AppMatchState) : DelabM (Array (Array Syntax)) :=
|
||||
withReader (fun ctx => { ctx with inPattern := true, optionsPerPos := {} }) do
|
||||
let ty ← instantiateForall st.matcherTy st.params
|
||||
forallTelescope ty fun params _ => do
|
||||
-- need to reduce `let`s that are lifted into the matcher type
|
||||
forallTelescopeReducing ty fun params _ => do
|
||||
-- skip motive and discriminators
|
||||
let alts := Array.ofSubarray params[1 + st.discrs.size:]
|
||||
alts.mapIdxM fun idx alt => do
|
||||
|
|
|
|||
11
tests/lean/heapSort.lean.expected.out
Normal file
11
tests/lean/heapSort.lean.expected.out
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
heapSort.lean:32:28-32:33: warning: declaration uses 'sorry'
|
||||
heapSort.lean:51:22-51:27: warning: declaration uses 'sorry'
|
||||
heapSort.lean:61:30-61:35: warning: declaration uses 'sorry'
|
||||
heapSort.lean:110:29-110:34: warning: declaration uses 'sorry'
|
||||
@Array.heapSort.loop._eq_1 : ∀ {α : Type u_1} (lt : α → α → Bool) (a : BinaryHeap α fun y x => lt x y) (out : Array α),
|
||||
Array.heapSort.loop lt a out =
|
||||
match BinaryHeap.max a, (_ : BinaryHeap.max a = BinaryHeap.max a) with
|
||||
| none, e => out
|
||||
| some x, e =>
|
||||
let_fun this := (_ : BinaryHeap.size (BinaryHeap.popMax a) < BinaryHeap.size a);
|
||||
Array.heapSort.loop lt (BinaryHeap.popMax a) (Array.push out x)
|
||||
Loading…
Add table
Reference in a new issue