wondering about -ddump-parsed, rn

Isaac Dupree isaacdupree at charter.net
Fri Aug 10 07:25:19 EDT 2007

Stefan O'Rear wrote:
> On Thu, Aug 09, 2007 at 06:51:12AM -0300, Isaac Dupree wrote:
>> Simon Peyton-Jones wrote:
>>> -ddump-parsed shows the program after parsing.  All operator application 
>>> are parsed *left-associative* with one precedence. Then the renamer 
>>> re-associates them to respect precedence and associativity.
>>> So, no, -ddump-parsed will definitely not give syntactically valid 
>>> Haskell. -ddump-rn probably will though.
>> yes, in that case, would anyone mind if I find an easy way to change GHC to 
>> parenthesize those non-infix uses of operators? :)  hmm... maybe _I_ would 
>> mind, since it makes "what GHC is doing" just a tiny bit less transparent 
>> to the user of -ddump-{rn,parsed}. :-)
> I fixed an identical bug in a copy of the code a few months ago.
> http://haskell.org/pipermail/libraries/2007-April/007317.html
> Unfortunately, I think TH was forked off from the in-compiler syntax
> tree too long ago for my fix to be useful...

Also these -ddump- outputs qualified infix usages
as an infix, where the backticks should not be there if it was Haskell.

If you know what you did to fix TH, can you easily add all those fixes 
to this copy of the code? (muses hopefully)

I see Simon PJ has removed the "wrong" -ddump-parsed parentheses :)


More information about the Glasgow-haskell-users mailing list