Skip to content

Commit

Permalink
Add "options" import category
Browse files Browse the repository at this point in the history
  • Loading branch information
SkySkimmer committed Jan 23, 2024
1 parent e012009 commit 32e1fdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/sphinx/language/core/modules.rst
Expand Up @@ -301,6 +301,8 @@ are now available through the dot notation.
:cmd:`Reserved Notation`), scope controls (:cmd:`Delimit Scope`,
:cmd:`Bind Scope`, :cmd:`Open Scope`) but not :ref:`Abbreviations`.

- ``options`` for :ref:`flags-options-tables`

- ``ltac.notations`` corresponding to :cmd:`Tactic Notation`.

- ``ltac2.notations`` corresponding to :cmd:`Ltac2 Notation`
Expand Down
6 changes: 4 additions & 2 deletions library/goptions.ml
Expand Up @@ -55,6 +55,8 @@ type 'a table_of_A = {
print : unit -> unit;
}

let opts_cat = Libobject.create_category "options"

module MakeTable =
functor
(A : sig
Expand Down Expand Up @@ -100,7 +102,7 @@ module MakeTable =
Libobject.declare_object {(Libobject.default_object nick) with
Libobject.object_stage = Summary.Stage.Synterp;
Libobject.load_function = load_options;
Libobject.open_function = Libobject.simple_open load_options;
Libobject.open_function = Libobject.simple_open ~cat:opts_cat load_options;
Libobject.cache_function = cache_options;
Libobject.subst_function = subst_options;
Libobject.classify_function = (fun x -> Substitute)}
Expand Down Expand Up @@ -295,7 +297,7 @@ let declare_option cast uncast append ?(preprocess = fun x -> x)
{ (default_object (nickname key)) with
object_stage = stage;
load_function = load_options;
open_function = simple_open open_options;
open_function = simple_open ~cat:opts_cat open_options;
cache_function = cache_options;
subst_function = subst_options;
discharge_function = discharge_options;
Expand Down

0 comments on commit 32e1fdb

Please sign in to comment.