[Haskell-cafe] Re: Shouldnt this be lazy too?

Ian Lynagh igloo at earth.li
Mon Sep 24 12:59:35 EDT 2007

On Mon, Sep 24, 2007 at 06:28:59PM +0200, apfelmus wrote:
> I mean, Haskell does not magically detect that the 32(64)-bit integer 
> (10 + length [11..]) :: Int  is bigger than  10 :: Int .

That's partly because it's not true.

There are arbitrarily large finite lists for which the equivalent is
false, e.g. on a 32bit machine:

Prelude> 10 + length (replicate maxBound 'a')


More information about the Haskell-Cafe mailing list