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
let unfold = ref (fun (_ : stmt) -> false)
let printer =
let pref : Printer.extensible_printer option ref = ref None in
fun () ->
match !pref with Some pp -> pp | None ->
let pp = Printer.current_printer () in
let module PP = (val pp: Printer.PrinterClass) in
let module TAG = struct
let create = T.create
let unfold s = !unfold s
end in
let module TagPrinterClass = BUILD(TAG)(PP) in
let printer = new TagPrinterClass.printer in
pref := Some printer ; printer
let printer () =
let pp = Printer.current_printer () in
let module PP = (val pp: Printer.PrinterClass) in
let module TAG = struct
let create = T.create
let unfold s = !unfold s
end in
let module TagPrinterClass = BUILD(TAG)(PP) in
new TagPrinterClass.printer
let with_unfold_precond unfolder f fmt x =
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