[Haskell-cafe] Nofib modifications

2007-12-03 Thread Neil Mitchell
Hi,

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.

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Nofib modifications

2007-12-03 Thread Simon Peyton-Jones
By all means apply a patch, I think.

Simon

| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Mitchell
| Sent: 03 December 2007 17:34
| To: Haskell Cafe
| Cc: Simon Marlow; Malcolm Wallace; Duncan Coutts
| Subject: [Haskell-cafe] Nofib modifications
|
| Hi,
|
| 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.
|
| Thanks
|
| Neil
| ___
| Haskell-Cafe mailing list
| Haskell-Cafe@haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe