aboutsummaryrefslogtreecommitdiff
path: root/plugins/micromega
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2017-10-02 12:22:32 +0200
committerVincent Laporte2018-10-10 15:19:07 +0000
commit8ac6145d5cc14823df48698a755d8adf048f026c (patch)
treefa8bf650d111b828958ad7468fd0ec3b445d2305 /plugins/micromega
parentea38cc10b1b3d81e2346de6b95076733ef4fd7bb (diff)
[coqlib] Rebindable Coqlib namespace.
We refactor the `Coqlib` API to locate objects over a namespace `module.object.property`. This introduces the vernacular command `Register g as n` to expose the Coq constant `g` under the name `n` (through the `register_ref` function). The constant can then be dynamically located using the `lib_ref` function. Co-authored-by: Emilio Jesús Gallego Arias <e+git@x80.org> Co-authored-by: Maxime Dénès <mail@maximedenes.fr> Co-authored-by: Vincent Laporte <Vincent.Laporte@fondation-inria.fr>
Diffstat (limited to 'plugins/micromega')
-rw-r--r--plugins/micromega/coq_micromega.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/micromega/coq_micromega.ml b/plugins/micromega/coq_micromega.ml
index ec080edbdb..402e8b91e6 100644
--- a/plugins/micromega/coq_micromega.ml
+++ b/plugins/micromega/coq_micromega.ml
@@ -357,6 +357,8 @@ struct
["Coq";"Reals" ; "Rpow_def"];
["LRing_normalise"]]
+[@@@ocaml.warning "-3"]
+
let coq_modules =
Coqlib.(init_modules @
[logic_dir] @ arith_modules @ zarith_base_modules @ mic_modules)
@@ -379,6 +381,8 @@ struct
let gen_constant_in_modules s m n = EConstr.of_constr (UnivGen.constr_of_global @@ Coqlib.gen_reference_in_modules s m n)
let init_constant = gen_constant_in_modules "ZMicromega" Coqlib.init_modules
+ [@@@ocaml.warning "+3"]
+
let constant = gen_constant_in_modules "ZMicromega" coq_modules
let bin_constant = gen_constant_in_modules "ZMicromega" bin_module
let r_constant = gen_constant_in_modules "ZMicromega" r_modules