lean4-htt/src/Lean/Meta/MatchUtil.lean
Leonardo de Moura 5ea49c92bb chore: cleanup
2020-10-27 13:26:21 -07:00

16 lines
407 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
import Lean.Util.Recognizers
import Lean.Meta.Basic
namespace Lean.Meta
def matchEq? (e : Expr) : MetaM (Option (Expr × Expr × Expr)) := do
match e.eq? with
| r@(some _) => pure r
| none => pure (← whnf e).eq?
end Lean.Meta