Commit c4430e3e authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Prologue: use [dprintf] instead of [printf].

parent a87eb04e
......@@ -26,11 +26,10 @@ module Prologue () = struct
module Settings = struct
open Printf
open Gen
let () =
printf "module Settings = struct\n"
dprintf "module Settings = struct\n"
(* We do not want to fail in this setup phase when we run out of data, so
we define these modified generators. *)
......@@ -57,7 +56,7 @@ module Settings = struct
| _ -> capacity2
let () =
printf
dprintf
" let capacity = function 0 -> %d | 1 -> %d | _ -> %d\n"
capacity0 capacity1 capacity2
......@@ -67,7 +66,7 @@ module Settings = struct
bool()
let () =
printf " let overwrite_empty_slots = %b\n" overwrite_empty_slots
dprintf " let overwrite_empty_slots = %b\n" overwrite_empty_slots
(* Pick the threshold up to which we represent a persistent sequence as an
immutable array. *)
......@@ -76,7 +75,7 @@ module Settings = struct
interval_ 2 32 ()
let () =
printf " let threshold = %d\n" threshold
dprintf " let threshold = %d\n" threshold
(* Decide whether iterator validity should be checked. *)
......@@ -84,23 +83,23 @@ module Settings = struct
bool()
let () =
printf " let check_iterator_validity = %b\n" check_iterator_validity
dprintf " let check_iterator_validity = %b\n" check_iterator_validity
let () =
printf "end\n"
dprintf "end\n"
let () =
(* Print a functor invocation.. *)
printf "module C = Sek.Make(Settings)\n";
printf "open C;;\n";
dprintf "module C = Sek.Make(Settings)\n";
dprintf "open C;;\n";
(* Install convenient printers for debugging in the OCaml toplevel loop. *)
printf "#install_printer E.format;;\n";
printf "#install_printer E.Iter.format;;\n";
printf "#install_printer P.format;;\n";
printf "#install_printer P.Iter.format;;\n";
dprintf "#install_printer E.format;;\n";
dprintf "#install_printer E.Iter.format;;\n";
dprintf "#install_printer P.format;;\n";
dprintf "#install_printer P.Iter.format;;\n";
(* Load this file, which contains some of the code that is needed to
reproduce a problematic scenario. *)
printf "#use \"monolith/src/Prologue.ml\";;\n";
dprintf "#use \"monolith/src/Prologue.ml\";;\n";
()
end (* Settings *)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment