aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/printer.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-04-12 18:35:21 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-04-12 18:35:21 +0200
commita5c150a6a7fa980c5850aa247e62d02e29773235 (patch)
treee8f9a6211c3626d80d8427887bf181d10a3476f9 /printing/printer.ml
parenta74d64efb554e9fd57b8ec97fca7677033cc4fc4 (diff)
parentb63b9a86b09856262b5b7bb2b3bb01f704032d41 (diff)
Merge PR#441: Port Toplevel to the Stm API
Diffstat (limited to 'printing/printer.ml')
-rw-r--r--printing/printer.ml17
1 files changed, 15 insertions, 2 deletions
diff --git a/printing/printer.ml b/printing/printer.ml
index 239e1d7eb..35ddf2e8c 100644
--- a/printing/printer.ml
+++ b/printing/printer.ml
@@ -375,8 +375,21 @@ let pr_context_limit_compact ?n env sigma =
let pr_context_unlimited_compact env sigma =
pr_context_limit_compact env sigma
-let pr_context_of env sigma =
- match Flags.print_hyps_limit () with
+(* The number of printed hypothesis in a goal *)
+(* If [None], no limit *)
+let print_hyps_limit = ref (None : int option)
+
+let _ =
+ let open Goptions in
+ declare_int_option
+ { optsync = false;
+ optdepr = false;
+ optname = "the hypotheses limit";
+ optkey = ["Hyps";"Limit"];
+ optread = (fun () -> !print_hyps_limit);
+ optwrite = (fun x -> print_hyps_limit := x) }
+
+let pr_context_of env sigma = match !print_hyps_limit with
| None -> hv 0 (pr_context_limit_compact env sigma)
| Some n -> hv 0 (pr_context_limit_compact ~n env sigma)