diff options
| author | Emilio Jesus Gallego Arias | 2017-02-22 02:31:16 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2017-04-12 16:49:46 +0200 |
| commit | 55bddb4bf35fa68318aa57a5fa8a113d1fe51159 (patch) | |
| tree | ba6820b5c2c47bfce0f13ccd194c82f7e017b2bd /printing/printer.ml | |
| parent | 46856a80958f1aaa3242b6d37f018df9528e5e5f (diff) | |
[flags] Documentation and a minor tweak.
Mostly documentation and making a couple of local flags, local.
Diffstat (limited to 'printing/printer.ml')
| -rw-r--r-- | printing/printer.ml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/printing/printer.ml b/printing/printer.ml index 5e7e9ce548..f00350c6a5 100644 --- a/printing/printer.ml +++ b/printing/printer.ml @@ -365,8 +365,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) |
