diff options
| author | Gabriel Kerneis | 2014-05-15 16:46:31 +0100 |
|---|---|---|
| committer | Gabriel Kerneis | 2014-05-15 16:46:31 +0100 |
| commit | f09fc91feadd58481402c940a728bdda84aecb14 (patch) | |
| tree | d6261dd4d37ac5d73265527b7ef3bd196889400f /src | |
| parent | 5a23af520ddd3dedd9d5c4d7aeab5c5d6f2a7a4f (diff) | |
Make pp_exp export to buffer
Diffstat (limited to 'src')
| -rw-r--r-- | src/pretty_print.ml | 3 | ||||
| -rw-r--r-- | src/pretty_print.mli | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml index 9d435e1d..a3a0d61a 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -1286,6 +1286,7 @@ let doc_defs (Defs(defs)) = separate_map hardline doc_def defs let print ?(len=80) channel doc = ToChannel.pretty 1. len channel doc +let to_buf ?(len=80) buf doc = ToBuffer.pretty 1. len buf doc let pp_defs f d = print f (doc_defs d) -let pp_exp f e = print f (doc_exp e) +let pp_exp b e = to_buf b (doc_exp e) diff --git a/src/pretty_print.mli b/src/pretty_print.mli index 49c4af27..3fdf7841 100644 --- a/src/pretty_print.mli +++ b/src/pretty_print.mli @@ -1,9 +1,9 @@ open Ast open Type_internal -(* Prints on formatter the defs following source syntax *) +(* Prints the defs following source syntax *) val pp_defs : out_channel -> tannot defs -> unit -val pp_exp : out_channel -> exp -> unit +val pp_exp : Buffer.t -> exp -> unit (* Prints on formatter the defs as Lem Ast nodes *) val pp_lem_defs : Format.formatter -> tannot defs -> unit |
