[Haskell-cafe] Strange results when trying to create large Bool arrays.

Albert Y. C. Lai trebla at vex.net
Wed Jul 11 14:44:56 EDT 2007

Bryan O'Sullivan wrote:
> Int is a bit of an odd fish that way; it's a 
> window onto the underlying machine's behaviour, not a tidy, well-behaved 
> mathematical ring.

I'm just being picky here: where the underlying machine's behaviour is 
2's complement binary, it (Int, +, *) is actually a tidy, well-behaved 
mathematical ring, isomorphic to Z / 2^n Z. Furthermore, if there were 
overflow errors, the result would not be a ring, but an error monad over 
a ring or a CPO lifting a ring. (Not to say that they are not tidy, 
well-behaved, mathematical.)

More information about the Haskell-Cafe mailing list