[Haskell-cafe] Thunks and GHC pessimisation

Joachim Breitner mail at joachim-breitner.de
Mon Feb 25 09:44:51 CET 2013


Hi,

Am Sonntag, den 24.02.2013, 18:41 +0000 schrieb Tom Ellis:
> On Sun, Feb 24, 2013 at 07:12:24PM +0100, Joachim Breitner wrote:
> > You should try:
> > 
> > > million :: () -> Int
> > > million _ = 10 ^ (6 :: Int)
> > >
> > > many :: () -> [Int]
> > > many x = [1..million x]
> 
> Thanks Joachim, but that doesn't work either.

oh, strange, I though I had added
        Maybe you will need {-# NOINLINE million #-} as well.
to the mailing. Must have skipped or accidentally removed it... anyways,
with that pragma it works.

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130225/0400452d/attachment.pgp>


More information about the Haskell-Cafe mailing list