lean4-htt/tests/lean/run/instuniv.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

14 lines
458 B
Text

import Lean
open Lean
unsafe def tst : IO Unit :=
withImportModules #[{module := `Init.Data.Array}] {} fun env =>
match env.find? `Array.foldl with
| some info => do
IO.println (info.instantiateTypeLevelParams [levelZero, levelZero])
IO.println (info.instantiateValueLevelParams! [levelZero, levelZero])
IO.println (info.instantiateValueLevelParams! [levelZero])
| none => IO.println "Array.foldl not found"
#eval tst