[Haskell-cafe] Arithmetic overflow

Rob Leslie rob at mars.org
Fri Jan 24 22:55:07 UTC 2014


On Jan 24, 2014, at 8:42 AM, Levent Erkok <erkokl at gmail.com> wrote:

> On Thu, Jan 23, 2014 at 10:33 PM, Rob Leslie <rob at mars.org> wrote:
> 
>>  λ> (minBound :: Int) `quot` (-1)
>>  *** Exception: arithmetic overflow
>> 
>> Is this a bug?
> 
> I think this is a bug. It also seems to impact explicitly sized types:
> 
> Prelude Data.Int> (minBound::Int8) `quot` (-1)
> *** Exception: arithmetic overflow
> Prelude Data.Int> (minBound::Int16) `quot` (-1)
> *** Exception: arithmetic overflow
> 
> You should definitely report it. I think there’s a pending release of GHC, so they might be able to fix it shortly.

Thanks for the feedback; I went ahead and created a ticket:

  https://ghc.haskell.org/trac/ghc/ticket/8695

Cheers,

-- 
Rob Leslie
rob at mars.org




More information about the Haskell-Cafe mailing list