[GHC] #2166: minBound `rem` (-1) fails
GHC
trac at galois.com
Wed Mar 19 11:08:02 EDT 2008
#2166: minBound `rem` (-1) fails
----------------------------+-----------------------------------------------
Reporter: atsampson | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: libraries/base | Version: 6.8.2
Severity: minor | Resolution: wontfix
Keywords: | Difficulty: Unknown
Testcase: | Architecture: x86
Os: Linux |
----------------------------+-----------------------------------------------
Changes (by igloo):
* status: new => closed
* difficulty: => Unknown
* resolution: => wontfix
Comment:
It would be odd for
{{{
(minBound :: Int) `rem` (-1)
}}}
to be different to
{{{
snd ((minBound :: Int) `quotRem` (-1))
}}}
Perhaps we could also say
{{{
quotRem x y
| x == minBound && y == (-1) = (overflowError, 0)
}}}
although then the exception won't be thrown until later (is that good or
bad?).
Anyway, can you please make a
[http://www.haskell.org/haskellwiki/Library_submissions library
submissions proposal] for this?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2166#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list