[Haskell-cafe] Nofib modifications

Neil Mitchell ndmitchell at gmail.com
Mon Dec 3 12:33:46 EST 2007


Some of the nofib suite are messed up by Yhc/nhc because of the
monomorphism restriction. Take imaginary/bernouilli as an example:

powers = [2..] : map (zipWith (*) (head powers)) powers

Hugs and GHC both see powers :: [[Integer]] and a CAF.

Yhc (and nhc) both see powers :: (Enum a, Num a) => [[a]] and no CAF.

This completely destroys the performance in Yhc/nhc. Since this is not
so much a performance aspect but a compiler bug, based on a feature
whose future in Haskell' is as yet unclear, perhaps it would be wise
to patch nofib to include an explicit type signature where this
matters. I am happy to send in a patch (or just apply it) - but I have
no idea who "maintains" the suite. I've CC'd those people who make
substantial use of the nofib suite.



More information about the Haskell-Cafe mailing list