-ddump-parsed and infix operators

Roberto Zunino zunino at di.unipi.it
Tue Dec 14 14:36:30 EST 2004

I noticed that GHC 6.2.2 always parse infix operators as they were 
left-associative. For example:

Prelude> :info :
-- : is a data constructor
infixr 5 :
(:) :: forall a. a -> [a] -> [a]
Prelude> 1:2:3:[]

==================== Parser ====================
((1 GHC.Base.: 2) GHC.Base.: 3) GHC.Base.: GHC.Base.[]


I suppose that the parse tree is then "fixed" in a later stage.

(Or maybe the parse tree is fine but it gets unparsed in the wrong way?)

However, the output above is a bit puzzling to me. Should I report this 
as a minor bug or is this the intended output?

Thanks to your attention,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20041214/fa0c036e/signature.bin

More information about the Glasgow-haskell-users mailing list