From: simonm Date: Fri, 19 Feb 1999 10:48:58 +0000 (+0000) Subject: [project @ 1999-02-19 10:48:58 by simonm] X-Git-Tag: Approximately_9120_patches~6528 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1f4e6afca6e99a64c53bedb69e00a50212db281a;hp=54c13d5cd6703878a9f9ec5ed02fee5c0e01deb9;p=ghc-hetmet.git [project @ 1999-02-19 10:48:58 by simonm] Fix negate (toInteger (minBound :: Int)). --- diff --git a/ghc/lib/std/PrelNum.lhs b/ghc/lib/std/PrelNum.lhs index b092c9b..96dc994 100644 --- 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