loop fusion not working for Int32, Int64 as it does for Int ?
here is some code that works for Int, but gives me Stack Overflow for arguments 18 .. 24, and Out of memory for 25. (Just change the type annotation in main.)
import Data.Int import System.Environment bitcount x = if x > 0 then let (d,m) = divMod x 2 in bitcount d + m else 0 main = do [ arg ] <- getArgs print $ sum $ map bitcount [ 0 :: Int64 .. 2^read arg - 1 ]
Not sure whether it's a bug, but it's annoying. There is no conceptual difference between these numerical types, so I shouldn't have to rewrite my program when switching between them.