lean4-htt/tests/lean/run/methodsRetInhabited.lean
Sebastian Ullrich fd3f51012f
feat: shake import minimizer aware of the module system and arbitrary elaboration dependencies (#10575)
This PR adds the necessary infrastructure for recording elaboration
dependencies that may not be apparent from the resulting environment
such as notations and other metaprograms. An adapted version of `shake`
from Mathlib is added to `script/` but may be moved to another location
or repo in the future.
2025-09-28 16:00:00 +00:00

20 lines
422 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.

module
import all Init.Prelude
open Lean
def exec (x : MacroM α) : Option α :=
match x {
quotContext := `Expander
currMacroScope := 0
ref := default
methods := default } { macroScope := 0 } with
| EStateM.Result.ok a s => a
| _ => none
def tst : MacroM String := do
let n ← Macro.getCurrNamespace
return toString n
/-- info: some "[anonymous]" -/
#guard_msgs in
#eval exec tst