Text.PrettyPrint.HughesPJ fixities

Ian Lynagh igloo at earth.li
Thu Mar 4 00:46:27 EST 2004


Hi,

Text.PrettyPrint.HughesPJ (the same applies to
ghc/compiler/utils/Pretty.lhs) contains

infixl 6 <>
infixl 6 <+>
infixl 5 $$, $+$

whereas my intuition says that infixr will give more efficient
implementation. Is my intuition wrong? It seems to be supported by the
definitions of hcat, hsep, vcat being defined in terms of foldr.


We on #haskell are also confused by the changelog entry starting
"Cured massive performance bug." and ending
"I'm not satisfied that I've done the best possible job.  I'll send you
 the code if you are interested.".
It looks to me like the change was made and the original mail about the
problem appended without being reread?


Thanks
Ian



More information about the Libraries mailing list