aboutsummaryrefslogtreecommitdiff
path: root/interp/dumpglob.ml
diff options
context:
space:
mode:
Diffstat (limited to 'interp/dumpglob.ml')
-rw-r--r--interp/dumpglob.ml13
1 files changed, 10 insertions, 3 deletions
diff --git a/interp/dumpglob.ml b/interp/dumpglob.ml
index 274f9b851a..482303d935 100644
--- a/interp/dumpglob.ml
+++ b/interp/dumpglob.ml
@@ -1,6 +1,6 @@
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
-(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2019 *)
(* <O___,, * (see CREDITS file for the list of authors) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
@@ -69,7 +69,7 @@ let previous_state = ref MultFiles
let pause () = previous_state := !glob_output; glob_output := NoGlob
let continue () = glob_output := !previous_state
-open Decl_kinds
+open Decls
open Declarations
let type_of_logical_kind = function
@@ -104,13 +104,20 @@ let type_of_logical_kind = function
| Corollary -> "thm")
| IsPrimitive -> "prim"
+
+(** Data associated to global parameters and constants *)
+
+let csttab = Summary.ref (Names.Cmap.empty : logical_kind Names.Cmap.t) ~name:"CONSTANT"
+let add_constant_kind kn k = csttab := Names.Cmap.add kn k !csttab
+let constant_kind kn = Names.Cmap.find kn !csttab
+
let type_of_global_ref gr =
if Typeclasses.is_class gr then
"class"
else
match gr with
| Globnames.ConstRef cst ->
- type_of_logical_kind (Decls.constant_kind cst)
+ type_of_logical_kind (constant_kind cst)
| Globnames.VarRef v ->
"var" ^ type_of_logical_kind (Decls.variable_kind v)
| Globnames.IndRef ind ->