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. Cheers, - Conal
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
participants (2)
-
Conal Elliott -
Norman Ramsey