
Hi ho,
I can deduce that you have a 32-bit system (as I do). Because:
Prelude> 1000000000000 :: Int -727379968
So ([1 .. 1000000000000] :: [Int]) == [] and sum [] == 0 isn't surprising at all.
Once again, your explanation makes perfect sense :)
And now the really odd part... take away one zero
Prelude> let d = [1..100000000000] :: [Int]
Prelude> 100000000000 :: Int 1215752192
, which is a pretty large number. Since you gave the list a name, it stays in memory. For each Int in the list, at least 3 machine words are needed (one for the Int, pointer from cons-cell to value, pointer to next cons- cell; actually, I think the overhead is larger), so if you have less than 14GB of RAM, your ghci can't do it.
Fair enough, I don't think my laptop is quite up to that :) Thanks for your help, - Philip