summaryrefslogtreecommitdiff
path: root/src/pretty_print.ml
diff options
context:
space:
mode:
authorKathy Gray2015-09-28 17:06:23 +0100
committerKathy Gray2015-09-28 17:06:36 +0100
commitd42ab302c2fbb2e5ffbd3ab88ab22c614a0905a4 (patch)
treee51cc7687d30163c38c61148b65c079cba503177 /src/pretty_print.ml
parent99815e730f4a0588ac886ad1bdf8ae0e1a5c9849 (diff)
basic untested ocaml boiler plate
Diffstat (limited to 'src/pretty_print.ml')
-rw-r--r--src/pretty_print.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml
index bea62fbd..6d18d2f0 100644
--- a/src/pretty_print.ml
+++ b/src/pretty_print.ml
@@ -1585,3 +1585,10 @@ let doc_def_ocaml def = group (match def with
| DEF_reg_dec dec -> empty (*unless we want to have something for the declaration of a register and guess a default init value*)
| DEF_scattered sdef -> empty (*shoulnd't still be here*)
) ^^ hardline
+
+let doc_defs_ocaml (Defs(defs)) =
+ separate_map hardline doc_def_ocaml defs
+let pp_defs_ocaml f d top_line opens =
+ print f ((string top_line) ^^ hardline ^^
+ (separate_map hardline (fun lib -> (string "open") ^^ space ^^ (string lib)) opens) ^^
+ (doc_defs_ocaml d))