[m-rev.] for review: pretty_printer.m changes

Julien Fischer jfischer at opturion.com
Tue Aug 9 00:22:56 AEST 2016


Hi Zoltan,

On Mon, 8 Aug 2016, Zoltan Somogyi wrote:

>  %---------------------------------------------------------------------------%
> diff --git a/library/pretty_printer.m b/library/pretty_printer.m
> index 9a76374..cbb8de9 100644
> --- a/library/pretty_printer.m
> +++ b/library/pretty_printer.m
> @@ -150,35 +150,26 @@
>      % write_doc(Doc, !IO):
>      % write_doc(FileStream, Doc, !IO):
>      %
> -    % Format Doc to io.stdout_stream or FileStream respectively, using
> -    % write_doc_to stream, with include_details_cc, the default formatter_map,
> -    % and the default pp_params.
> +    % Format Doc to io.stdout_stream or FileStream respectively using put_doc,
> +    % with include_details_cc, the default formatter_map, and the default
> +    % pp_params.
>      %
>  :- pred write_doc(doc::in, io::di, io::uo) is det.
>  :- pred write_doc(io.output_stream::in, doc::in, io::di, io::uo) is det.
> 
> -    % write_doc_to_stream(Stream, FMap, LineWidth, MaxLines, Limit,
> -    %   Doc, !State):
> +    % put_doc(Stream, Canonicalize, FMap, Params, Doc, !State):
>      %
> -    % Format Doc to fit on lines of LineWidth chars, truncating after
> -    % MaxLines lines, formatting format_univ(_) docs using specialised
> -    % formatters Formatters starting with pretty-printer limits Limit.
> +    % Format Doc to !State. Format format_univ(_) docs using specialised

s/!State/Stream/

> +    % formatters Formatters, and using Params as the pretty printer parameters.
> +    % The Canonicalize argument controls how put_doc deconstructs values
> +    % of noncanonical types (see the documentation of the noncanon_handling
> +    % type for details).

The rest looks fine.

Julien.


More information about the reviews mailing list