lean4-htt/src/Lean/Elab/Tactic/ExposeNames.lean
Leonardo de Moura b81dd3e7ad
feat: expose_names tactic (#6935)
This PR adds the tactic `expose_names`. It creates a new goal whose
local context has been "exposed" so that every local declaration has a
clear, accessible name. If no local declarations require renaming, the
original goal is returned unchanged.

This tactic will be used to improve `try?`.
2025-02-04 00:53:31 +00:00

15 lines
443 B
Text

/-
Copyright (c) 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Leonardo de Moura
-/
prelude
import Lean.Meta.Tactic.ExposeNames
import Lean.Elab.Tactic.Basic
namespace Lean.Elab.Tactic
@[builtin_tactic Lean.Parser.Tactic.exposeNames] def evalExposeNames : Tactic := fun _ =>
liftMetaTactic1 fun mvarId => mvarId.exposeNames
end Lean.Elab.Tactic