blob: 59e6e0fbc8bd8fb3bb3ef48855601f2bf5aedbd6 [file]
/-
Copyright (c) 2022 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
module
prelude
public import Lean.Meta.Tactic.Congr
public import Lean.Elab.Tactic.Basic
public section
namespace Lean.Elab.Tactic
namespace Lean.Elab.Tactic
@[builtin_tactic Parser.Tactic.congr] def evalCongr : Tactic := fun stx =>
match stx with
| `(tactic| congr $[$n?]?) =>
let hugeDepth := 1000000
let depth := n?.map (ยท.getNat) |>.getD hugeDepth
liftMetaTactic fun mvarId => mvarId.congrN depth
| _ => throwUnsupportedSyntax
end Lean.Elab.Tactic