[Haskell-cafe] Indenting with PPrint

Joel Reymont joelr1 at gmail.com
Tue May 8 02:39:15 EDT 2007


Brandon,

On May 8, 2007, at 12:33 AM, Brandon Michael Moore wrote:

> braces x = group (PP. braces (nest 4 (linebreak <> x) <> linesbreak)

I ended up with the following:

nest = PP.nest 4
braces x = nest (lbrace <$> x) <$> rbrace

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

	Thanks, Joel

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list