lean4-htt/tests/pkg/user_attr_app/Main.lean
Sebastian Ullrich 5df4e48dc9
feat: importModules without loading environment extensions (#6325)
This PR ensures that environments can be loaded, repeatedly, without
executing arbitrary code
2025-04-02 08:37:11 +00:00

16 lines
360 B
Text

import UserAttr.Tst
open Lean
def tst : MetaM Unit := do
let env ← getEnv
assert! (blaAttr.hasTag env `f)
assert! (blaAttr.hasTag env `g)
assert! !(blaAttr.hasTag env `id)
pure ()
#eval tst
unsafe def main : IO Unit := do
initSearchPath (← Lean.findSysroot)
withImportModules #[{ module := `UserAttr.Tst : Import }] {} fun env => pure ()