projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54c13d5
)
[project @ 1999-02-19 10:48:58 by simonm]
author
simonm
<unknown>
Fri, 19 Feb 1999 10:48:58 +0000
(10:48 +0000)
committer
simonm
<unknown>
Fri, 19 Feb 1999 10:48:58 +0000
(10:48 +0000)
Fix negate (toInteger (minBound :: Int)).
ghc/lib/std/PrelNum.lhs
patch
|
blob
|
history
diff --git
a/ghc/lib/std/PrelNum.lhs
b/ghc/lib/std/PrelNum.lhs
index
b092c9b
..
96dc994
100644
(file)
--- a/
ghc/lib/std/PrelNum.lhs
+++ b/
ghc/lib/std/PrelNum.lhs
@@
-242,6
+242,7
@@
instance Num Integer where
(*) (J# s1 d1) (J# s2 d2)
= case timesInteger# s1 d1 s2 d2 of (# s, d #) -> J# s d
+ negate i@(S# (-2147483648#)) = 2147483648
negate (S# i) = S# (negateInt# i)
negate (J# s d) = J# (negateInt# s) d