[m-dev.] Contribution: Pretty Printing Library

Ralph Becket rbeck at microsoft.com
Wed Apr 12 23:16:32 AEST 2000


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> 
> On 12-Apr-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> > > Something else that would be nice would be providing a way
> > > to insert something at the end of every line.  This would
> > > be useful for formatting code in languages such as `sh',
> > > `sed', or `make' that use line continuation characters
> > > (e.g. trailing backslash).
> > 
> > Agh!  It was nice and simple.  It's growing hairy!  But you're
> > right...
> 
> Well, that feature doesn't need to be in version one.
> If it is easy to implement, then it is certainly worth
> having, but if it complicates things a lot then it would
> be fine to just document it as a wishlist item.

One way of doing it would be to generalise line/0 somewhat, for
example

line              as before
line(" ")         turns into a space if flattened
line(" ", "\\")   turns into a space if flattened or is preceeded
                  by "\\" if it is a real newline.

I don't think adding these variants would cause too much grief...
I'll see what can be done.

Cheers,

Ralph
--------------------------------------------------------------------------
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