haskell-suite/haskell-src-exts — pull request #136 by pjonsson (2014-06-07 19:55:55+00:00)
Title: Omit parentheses when pretty-printing single member contexts.

@feuerbach: Nothing technical to review, but a decision should probably be made whether this is a good idea or not.

Ticket #17 hints that we are not treating parenthesis perfectly and things should be restructured. Before that lands in the tree we can improve statistically with our pretty-printing by omitting parentheses on single member class contexts.

Of the test cases that change output, all but three (CxtWhitespace, GenericTree, SingleClassAsst) get a perfect round-trip. CxtWhitespace looks artificial and constructed to test whitespace behaviour of ExactPrinter. The remaining two seem real though, but it's still 9 test cases improving compared to 2 "degrading".