[Haskell-cafe] Why this exception occurs ?
Ketil Malde
ketil at ii.uib.no
Fri May 25 04:17:31 EDT 2007
On Fri, 2007-05-25 at 17:33 +1000, Donald Bruce Stewart wrote:
> Sorry, I should clarify, think about how to represent:
>
> 256 :: Word8
So the error isn't really divide by zero, but overflow. I've been
bitten by this, too, and L.Guo should count him/herself lucky to get an
error, and not just incorrect results.
IMO, this is a rather nasty hole in the safety nets that Haskell is so
abundantly endowed with. Does any Haskell implementation support
overflow detection?
-k
More information about the Haskell-Cafe
mailing list