[Haskell-cafe] generating parens for pretty-printing code in haskell-src-exts

Conal Elliott conal at conal.net
Sun Jan 15 06:45:18 CET 2012


I'm using haskell-src-exts together with SYB for a code-rewriting project,
and I'm having difficulty with parenthesization. I naïvely expected that
parentheses would be absent from the abstract syntax, being removed during
parsing and inserted during pretty-printing. It's easy for me to remove
them myself, but harder to add them (minimally) after transformation.
Rather than re-inventing the wheel, I thought I'd ask for help.

Has anyone written automatic minimal parens insertion for haskell-src-exts?

-- Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120114/a2e5d980/attachment-0001.htm>


More information about the Haskell-Cafe mailing list