[Haskell-cafe] Why this exception occurs ?
Donald Bruce Stewart
dons at cse.unsw.edu.au
Fri May 25 04:24:14 EDT 2007
ketil:
> 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.
I've always thought that the obfuscation opportunities for Num
literal overloading, combined with Num *overflowing* were
underappreciated.
instance Num String anyone? Mwhaha
-- Don
More information about the Haskell-Cafe
mailing list