Commit bc1ee0f3 authored by POTTIER Francois's avatar POTTIER Francois

Cleanup.

parent 68c05059
open PPrint
open Coq
(* This function could move to [PPrint]. *)
(* These functions could move to [PPrint]. *)
let sprintf format =
Printf.ksprintf arbitrary_string format
let run (print : Buffer.t -> 'a -> unit) (x : 'a) : string =
let b = Buffer.create 1024 in
print b x;
Buffer.contents b
(* -------------------------------------------------------------------------- *)
(* Global parameters. *)
......@@ -353,8 +358,8 @@ let tops ts =
(* -------------------------------------------------------------------------- *)
(* The main entry point translates a list of toplevel elements to a string. *)
let tops ts : string =
let b = Buffer.create 1024 in
PPrintEngine.ToBuffer.pretty 0.9 width b (tops ts);
Buffer.contents b
run (PPrintEngine.ToBuffer.pretty 0.9 width) (tops ts)
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