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

Stefan O'Rear stefanor at cox.net
Wed Jul 11 15:32:27 EDT 2007

On Wed, Jul 11, 2007 at 08:16:50PM +0100, Andrew Coppin wrote:
> Bryan O'Sullivan wrote:
>> Richard Kelsall wrote:
>>> I guess there must be a switch to make it produce a nice
>>> error message rather than overflowing without warning.
>> Actually, there isn't.
> I for one sometimes wish there was...
> Of course, sometimes you purposely write code which you know is going to 
> overflow and wrap round in a specific way. But frequently you *don't* want 
> this behaviour - and I wish there were some pragma or something to make 
> this be checked. AFAIK, most CPU types give you an efficient way to testing 
> for such conditions...

Indeed.  I beleive that Int should be removed from the Prelude.  People
who need the algebraic properties of rings modulo 2^(2^n) can use the
sized integral types from Data.Int and Data.Word; people who want speed
and can satisfy the proof obligations can use Int and Word from the same
modules.  Everyone else can use Integer, which should be made shorter than
Int for obvious psychological reasons.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070711/4f520b1c/attachment.bin

More information about the Haskell-Cafe mailing list