Skip to content

Commit

Permalink
document Print Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Villetaneuse committed Jan 10, 2024
1 parent 50ca6d5 commit e7c894d
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion doc/sphinx/language/core/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,31 @@ are now available through the dot notation.
:cmd:`Print Module Type`.

.. cmd:: Print Namespace @dirpath
:undocumented:

Prints the names and types of all loaded constants whose fully qualified
names start with :n:`@dirpath`. For example, the command ``Print Namespace Coq.``
displays the names and types of all loaded constants in the standard library.
The command ``Print Namespace Coq.Init`` only shows constants defined in one
of the files in the ``Init`` directory. The command ``Print Namespace
Coq.Init.Nat`` shows what is in the ``Nat`` library file inside the ``Init``
directory. Module names may appear in :n:`@dirpath`.

.. example::

.. coqtop:: reset in

Module A.
Definition foo := 0.
Module B.
Definition bar := 1.
End B.
End A.

.. coqtop:: all

Print Namespace Top.
Print Namespace Top.A.
Print Namespace Top.A.B.

.. _module_examples:

Expand Down

0 comments on commit e7c894d

Please sign in to comment.