15 Oct
2007
15 Oct
'07
5:39 p.m.
The haskell-src package contains a pretty-printer for Haskell syntax that requires parentheses to be explicitly placed in the (abstract) syntax representation. I have some code for automatically inserting parentheses where necessary (for use before pretty-printing), but I'm guessing someone else has done so better than I. Does anyone have pointers? I'm glad to share my version as well.
Conal, I don't have code, but I did publish an algorithm for inserting parentheses minimally: http://tinyurl.com/24xbp7 There's code on that page but I'm sorry to say it's ML code :-( Norman