chore: improve trace messages
This commit is contained in:
parent
bbec84bb18
commit
ef449e816f
2 changed files with 4 additions and 4 deletions
|
|
@ -265,11 +265,11 @@ end Unify
|
|||
private def unify? (altFVarDecls : List LocalDecl) (a b : Expr) : MetaM (Option FVarSubst) := do
|
||||
let a ← instantiateMVars a
|
||||
let b ← instantiateMVars b
|
||||
let (b, s) ← Unify.unify a b { altFVarDecls := altFVarDecls} |>.run {}
|
||||
if b then
|
||||
let (r, s) ← Unify.unify a b { altFVarDecls := altFVarDecls} |>.run {}
|
||||
if r then
|
||||
pure s.fvarSubst
|
||||
else
|
||||
trace[Meta.Match.unify] "failed to unify {a} =?= {b}"
|
||||
trace[Meta.Match.unify] "failed to unify{indentExpr a}\nwith{indentExpr b}"
|
||||
pure none
|
||||
|
||||
private def expandVarIntoCtor? (alt : Alt) (fvarId : FVarId) (ctorName : Name) : MetaM (Option Alt) :=
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ private def tryLemmaCore (lhs : Expr) (xs : Array Expr) (bis : Array BinderInfo)
|
|||
-- We do not report unification failures when `lhs` is a metavariable
|
||||
-- Example: `x = ()`
|
||||
-- TODO: reconsider if we want lemmas such as `(x : Unit) → x = ()`
|
||||
trace[Meta.Tactic.simp.unify] "{lemma}, failed to unify {lhs} with {e}"
|
||||
trace[Meta.Tactic.simp.unify] "{lemma}, failed to unify{indentExpr lhs}\nwith{indentExpr e}"
|
||||
return none
|
||||
/- Check whether we need something more sophisticated here.
|
||||
This simple approach was good enough for Mathlib 3 -/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue