Skip to content
Snippets Groups Projects
Commit 67d6b1eb authored by David Bühler's avatar David Bühler
Browse files

[Gui] Printer_tag: removes the cache for the printer.

Fixes a bug in the GUI where function contracts disappeared when the
preconditions were unfold at a call site.
parent 64eb5ec7
No related branches found
No related tags found
No related merge requests found
...@@ -521,19 +521,15 @@ struct ...@@ -521,19 +521,15 @@ struct
let unfold = ref (fun (_ : stmt) -> false) let unfold = ref (fun (_ : stmt) -> false)
let printer = let printer () =
let pref : Printer.extensible_printer option ref = ref None in let pp = Printer.current_printer () in
fun () -> let module PP = (val pp: Printer.PrinterClass) in
match !pref with Some pp -> pp | None -> let module TAG = struct
let pp = Printer.current_printer () in let create = T.create
let module PP = (val pp: Printer.PrinterClass) in let unfold s = !unfold s
let module TAG = struct end in
let create = T.create let module TagPrinterClass = BUILD(TAG)(PP) in
let unfold s = !unfold s new TagPrinterClass.printer
end in
let module TagPrinterClass = BUILD(TAG)(PP) in
let printer = new TagPrinterClass.printer in
pref := Some printer ; printer
let with_unfold_precond unfolder f fmt x = let with_unfold_precond unfolder f fmt x =
let stack = !unfold in let stack = !unfold in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment