On Tue, May 08, 2007 at 07:39:15AM +0100, Joel Reymont wrote:
>
> >If you happen to be formatting C I've also worked out how to get
> >nice argument
> >lists out of both pretty printers.
>
> I'm formatting C# but I'll certainly take your arg list tips.
These narrow like
foo (a, b)
foo (a,
b)
foo
(a, b)
foo
(a,
b)
as space gets tight.
PPrint:
name <> nest 2 softline <> parens (align (sep (punctuate comma args)))
Text.PrettyPrint.HughesPJ:
sep [name, lparen] <> sep (punctuate comma args) <> rparen
Brandon
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe