Hi Daniel,

> Funny, I did the opposite approach the other day (not saying either is better
> :)); that is: parenthesize everything while building the AST (with a wrapper
> for App) and then:

I have utilities in HLint for that too - but I don't want to remove
users brackets automatically :-)

Btw, if you use uniplate you might find your code goes faster, and is simpler:

deparenthesize :: (Data a) => a -> a
deparenthesize = transformBi goT . transformBi goT
    where

(the rest exactly as before, but skipping isString)

I always use Uniplate when working with HSE - they go great together
(do import Data.Generics.PlateData, and you don't need any extra
instances or anything)

Thanks, Neil
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to