chore: improve error message
This commit is contained in:
parent
c17a1c382f
commit
09de37e8e5
3 changed files with 3 additions and 3 deletions
|
|
@ -211,7 +211,7 @@ private def reportStuckSyntheticMVars : TermElabM Unit := do
|
|||
withMVarContext mvarSyntheticDecl.mvarId do
|
||||
let mvarDecl ← getMVarDecl mvarSyntheticDecl.mvarId
|
||||
unless (← get).messages.hasErrors do
|
||||
logError <| "typeclass instance problem contains metavariables" ++ indentExpr mvarDecl.type
|
||||
logError <| "typeclass instance problem is stuck, it is often due to metavariables" ++ indentExpr mvarDecl.type
|
||||
| SyntheticMVarKind.coe header expectedType eType e f? =>
|
||||
withMVarContext mvarSyntheticDecl.mvarId do
|
||||
let mvarDecl ← getMVarDecl mvarSyntheticDecl.mvarId
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
297.lean:1:10-1:11: error: typeclass instance problem contains metavariables
|
||||
297.lean:1:10-1:11: error: typeclass instance problem is stuck, it is often due to metavariables
|
||||
OfNat (Sort ?u) 0
|
||||
297.lean:2:0-2:1: error: failed to synthesize instance
|
||||
OfNat (Id PUnit) 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
defaultInstance.lean:20:20-20:23: error: failed to synthesize instance
|
||||
Foo Bool (?m x)
|
||||
defaultInstance.lean:22:35-22:38: error: typeclass instance problem contains metavariables
|
||||
defaultInstance.lean:22:35-22:38: error: typeclass instance problem is stuck, it is often due to metavariables
|
||||
Foo Bool (?m x)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue