chore: calc: improve error range
This commit is contained in:
parent
35ccf7b163
commit
8265d8bb13
2 changed files with 2 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ def elabCalcSteps (steps : Array Syntax) : TermElabM Expr := do
|
|||
let mut result := proofs[0]!
|
||||
let mut resultType := types[0]!
|
||||
for i in [1:proofs.size] do
|
||||
(result, resultType) ← withRef steps[i]! <| mkCalcTrans result resultType proofs[i]! types[i]!
|
||||
(result, resultType) ← withRef steps[i]![0] <| mkCalcTrans result resultType proofs[i]! types[i]!
|
||||
return result
|
||||
|
||||
/-- Elaborator for the `calc` term mode variant. -/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ previous right-hand-side is
|
|||
b + b : Nat
|
||||
calcErrors.lean:15:8-15:11: error: invalid 'calc' step, relation expected
|
||||
p a
|
||||
calcErrors.lean:20:8-20:19: error: invalid 'calc' step, failed to synthesize `Trans` instance
|
||||
calcErrors.lean:20:8-20:13: error: invalid 'calc' step, failed to synthesize `Trans` instance
|
||||
Trans p p ?m
|
||||
calcErrors.lean:27:7-27:12: error: invalid 'calc' step, left-hand-side is
|
||||
γ : Sort u_1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue