This PR adjusts the experimental module system to make `private` the default visibility modifier in `module`s, introducing `public` as a new modifier instead. `public section` can be used to revert the default for an entire section, though this is more intended to ease gradual adoption of the new semantics such as in `Init` (and soon `Std`) where they should be replaced by a future decl-by-decl re-review of visibilities.
34 lines
869 B
Text
34 lines
869 B
Text
/-
|
||
Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||
Released under Apache 2.0 license as described in the file LICENSE.
|
||
Authors: Leonardo de Moura
|
||
-/
|
||
module
|
||
|
||
prelude
|
||
public import Init.NotationExtra
|
||
|
||
public section
|
||
|
||
namespace Lean.Grind
|
||
/-!
|
||
This is a hackish module for hovering node information in the `grind` tactic state.
|
||
-/
|
||
|
||
inductive NodeDef where
|
||
| unit
|
||
|
||
set_option linter.unusedVariables false in
|
||
def node_def (_ : Nat) {α : Sort u} {a : α} : NodeDef := .unit
|
||
|
||
@[app_unexpander node_def]
|
||
meta def nodeDefUnexpander : PrettyPrinter.Unexpander := fun stx => do
|
||
match stx with
|
||
| `($_ $id:num) => return mkIdent <| Name.mkSimple $ "#" ++ toString id.getNat
|
||
| _ => throw ()
|
||
|
||
@[app_unexpander NodeDef]
|
||
meta def NodeDefUnexpander : PrettyPrinter.Unexpander := fun _ => do
|
||
return mkIdent <| Name.mkSimple "NodeDef"
|
||
|
||
end Lean.Grind
|