Andrew Coppin wrote:
Stefan O'Rear wrote:
Also, large numbers don't (this is arguably a bug...) have restricted
types:

[EMAIL PROTECTED]:~$ ghc -e '1000000000000000000 :: Int'
-1486618624

So many other programming languages allow weird things to happen with numeric overflows... it would be nice if Haskell didn't.

Shall we have a GHC warning if it can detect those cases, either the Haskell report bounds or that of the target GHC is currently compiling to? (of course someone would have to implement it, and there would always be cases it didn't check, and the (non-portable) behavior is sometimes desired...)

Hugs often does throw an exception (runtime error) rather than allow Int overflow (but not always).

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

Reply via email to