aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/options.ml2
-rw-r--r--lib/options.mli2
-rw-r--r--library/declare.ml2
-rw-r--r--toplevel/coqtop.ml2
4 files changed, 7 insertions, 1 deletions
diff --git a/lib/options.ml b/lib/options.ml
index c6b9621211..3459279bb1 100644
--- a/lib/options.ml
+++ b/lib/options.ml
@@ -73,6 +73,8 @@ let silently f x =
let if_silent f x = if !silent then f x
let if_verbose f x = if not !silent then f x
+let hash_cons_proofs = ref true
+
(* The number of printed hypothesis in a goal *)
let print_hyps_limit = ref (None : int option)
diff --git a/lib/options.mli b/lib/options.mli
index 3554bc98e5..d999425e92 100644
--- a/lib/options.mli
+++ b/lib/options.mli
@@ -44,6 +44,8 @@ val silently : ('a -> 'b) -> 'a -> 'b
val if_silent : ('a -> unit) -> 'a -> unit
val if_verbose : ('a -> unit) -> 'a -> unit
+val hash_cons_proofs : bool ref
+
(* Temporary activate an option ('c must be an atomic type) *)
val with_option : bool ref -> ('a -> 'b) -> 'a -> 'b
diff --git a/library/declare.ml b/library/declare.ml
index c2d83a71cd..93a90380c8 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -179,7 +179,7 @@ let (in_constant, out_constant) =
export_function = export_constant }
let hcons_constant_declaration = function
- | DefinitionEntry ce ->
+ | DefinitionEntry ce when !Options.hash_cons_proofs ->
let (hcons1_constr,_) = hcons_constr (hcons_names()) in
DefinitionEntry
{ const_entry_body = hcons1_constr ce.const_entry_body;
diff --git a/toplevel/coqtop.ml b/toplevel/coqtop.ml
index d220036379..248f68796f 100644
--- a/toplevel/coqtop.ml
+++ b/toplevel/coqtop.ml
@@ -256,6 +256,8 @@ let parse_args is_ide =
| "-v7" :: rem -> (* Options.v7 := true; *) parse rem
| "-v8" :: rem -> (* Options.v7 := false; *) parse rem
+ | "-no-hash-consing" :: rem -> Options.hash_cons_proofs := false; parse rem
+
(* Translator options *)
| "-strict-implicit" :: rem ->
Options.translate_strict_impargs := false; parse rem