This PR adjusts the experimental module system to not export the bodies of `def`s unless opted out by the new attribute `@[expose]` on the `def` or on a surrounding `section`. --------- Co-authored-by: Markus Himmel <markus@lean-fro.org>
16 lines
320 B
Text
16 lines
320 B
Text
module
|
|
|
|
private import Module.Basic
|
|
|
|
/-! `private import` should allow only private access to imported decls. -/
|
|
|
|
def g := f
|
|
|
|
/-- error: unknown identifier 'f' -/
|
|
#guard_msgs in
|
|
set_option autoImplicit false in
|
|
theorem t2 : f = 1 := sorry
|
|
|
|
/-- error: unknown identifier 'f' -/
|
|
#guard_msgs in
|
|
@[expose] def h : True := f
|