RE: Enum Int problem

2004-08-20 Thread Simon Peyton-Jones
and thus stop | the sequence at element. | | Bo | | | -Original Message- | From: Alastair Reid [mailto:[EMAIL PROTECTED] | Sent: Wednesday, August 18, 2004 3:59 AM | To: Bo Ilic | Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] | Subject: Re: Enum Int problem | | | [copied to hugs-bugs] | | You

RE: Enum Int problem

2004-08-19 Thread Bo Ilic
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Enum Int problem [copied to hugs-bugs] You shouldn't hope to get any useful results from Int after an arithmetic overflow since the Haskell report explicitly says that the results are unspecified. If you want predictable results, you should

Re: Enum Int problem

2004-08-19 Thread Alastair Reid
It seems to me that it is worthwhile to fix [problems caused by overflow] But what's the point? If your code is going that close to the limits, it is already non-portable. If you really do need to go that close to the limits, use a datatype whose behaviour is precisely specified and portable

Re: Enum Int problem

2004-08-18 Thread Alastair Reid
[copied to hugs-bugs] You shouldn't hope to get any useful results from Int after an arithmetic overflow since the Haskell report explicitly says that the results are unspecified. If you want predictable results, you should use Integer or Foreign.Int32. The latter is part of the foreign