chore: add type to error message
This commit is contained in:
parent
c391521891
commit
a79b50d629
2 changed files with 2 additions and 1 deletions
|
|
@ -258,7 +258,7 @@ def elabBinCalc : TermElab := fun stx expectedType? => do
|
|||
for stepStx in stepStxs do
|
||||
let type ← elabType stepStx[0]
|
||||
let some (_, lhs, _) ← relation? type |
|
||||
throwErrorAt stepStx[0] "invalid 'calc' step, relation expected"
|
||||
throwErrorAt stepStx[0] "invalid 'calc' step, relation expected{indentExpr type}"
|
||||
if types.size > 0 then
|
||||
let some (_, _, prevRhs) ← relation? types.back | unreachable!
|
||||
unless (← isDefEqGuarded lhs prevRhs) do
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ calcErrors.lean:7:8-7:29: error: invalid 'calc' step, left-hand-side is
|
|||
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
|
||||
Trans p p ?m
|
||||
calcErrors.lean:27:7-27:12: error: invalid 'calc' step, left-hand-side is
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue