Commit c05bdf4d authored by POTTIER Francois's avatar POTTIER Francois

Same [PPrintAux] in both demo directories.

parent af70ede0
......@@ -9,6 +9,9 @@ let indentation = 2
let block opening contents closing =
group (opening ^^ nest indentation (contents) ^^ closing)
let oblock opening contents =
block opening contents empty
(* -------------------------------------------------------------------------- *)
(* Parentheses with indentation. *)
......@@ -51,3 +54,7 @@ let run (oc : out_channel) (print : Buffer.t -> 'a -> unit) (x : 'a) =
let output (oc : out_channel) (d : document) =
run oc (PPrintEngine.ToBuffer.pretty 0.9 80) d
let adapt (f : 'a -> document) : out_channel -> 'a -> unit =
fun oc x ->
output oc (f x)
Markdown is supported
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