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?`.
15 lines
443 B
Text
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
|