[m-dev.] For review: pprint.m - last chance to comment...
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed May 3 12:43:25 AEST 2000
On 02-May-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> library/pprint.m:
> Added a new pretty-printer module to the standard library. The
> pretty printer is an almost direct transliteration of the one
> described by Wadler in his paper "A Prettier Printer". It is
> pretty much equivalent in power to Hughes' classic design, but
> superior in design in a number of respects (for one thing, it's
> much simpler). Fairly extensive documentation can be found in
> the leader comment of the module itself and in its interface
> section.
>
> library/library.m
> Added pprint to import set.
You should mention this in the NEWS file.
> % 3. group(text("Hello ") `<>` nest(2, line `<>` text("world")))
> %
> % Hello world
> %
> % Hello
> % world
s/2/3/
> % Various bracketing functions.
> %
> :- func bracketed(string, string, doc) = doc.
> :- func parentheses(doc) = doc.
> :- func brackets(doc) = doc.
> :- func braces(doc) = doc.
These should be documented in a little more detail, IMHO.
> % Handy punctuation docs and versions with following
> % spaces and/or line breaks.
> %
> :- func comma = doc.
> :- func semic = doc.
I suggesting adding a comment explaining the `semic'
abbreviation:
:- func semic = doc. % semicolon
Otherwise, that looks great -- thanks!
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list