[Haskell] pretty printing Haskell code with auto parens?
John Meacham
john at repetae.net
Tue Apr 12 22:30:58 EDT 2005
On Tue, Apr 12, 2005 at 06:33:13PM -0700, Conal Elliott wrote:
> No reply yet.
>
> Alternatively, does anyone happen to have a HsExp->HsExp (for
> Language.Haskell.Syntax) pass that inserts disambiguating parentheses as
> needed, to be applied just before pretty-printing?
There is one included in 'hatchet' which I have succescfully reused in
other projects. A bug is that it doesn't refix infix patterns, but that
should be easy to fix.
http://www.cs.mu.oz.au/~bjpop/hatchet.html
You will probably have to write something to collect fixities from
imported modules.
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell
mailing list