Skip to content

Commit

Permalink
Reset printing options back to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
tlringer committed Feb 2, 2018
1 parent 0428829 commit 59adeb4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugin/src/library/coq/printing.ml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ let debug_env (env : env) (descriptor : string) : unit =

(* Print a patch to stdout in the standard Coq format *)
let print_patch env evm patch_id patch : unit =
let _ = set_bool_option_value ["Printing";"All"] true in
let opts = get_tables () in
let print_all =
match (OptionMap.find ["Printing"; "All"] opts).opt_value with
| BoolValue b -> b
| _ -> true
in
let _ = set_bool_option_value ["Printing"; "All"] true in
Pp.pp_with
Format.std_formatter
(Pp.pr_sequence
Expand All @@ -149,4 +155,5 @@ let print_patch env evm patch_id patch : unit =
(Pp.str ":=");
(pr_lconstr_env env evm patch);
(Pp.str ".\nEND PATCH");
(Pp.str "\n")])
(Pp.str "\n")]);
set_bool_option_value ["Printing"; "All"] print_all

0 comments on commit 59adeb4

Please sign in to comment.