lean4-htt/tests/lean/moduleOf.lean
Leonardo de Moura fcd73e72c1 feat: add getModuleOf
cc @Kha @Vtec234
2021-01-07 15:20:29 -08:00

16 lines
415 B
Text

import Lean
def f (x : Nat) := x + x
open Lean
def tst : MetaM Unit := do
IO.println (← getModuleOf `HAdd.hAdd)
IO.println (← getModuleOf `Lean.Core.CoreM)
IO.println (← getModuleOf `Lean.Elab.Term.elabTerm)
IO.println (← getModuleOf `Std.HashMap.insert)
IO.println (← getModuleOf `tst)
IO.println (← getModuleOf `f)
IO.println (← getModuleOf `foo) -- Error: unknown 'foo'
#eval tst