diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-09-30 19:26:02 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-10-01 18:38:35 -0400 |
commit | e5523324d2c55e0091857e21bf5613b5f6b442a7 (patch) | |
tree | ca024915a9380f820d4f30419666e156c1109742 /libraries/ghc-bignum | |
parent | a8018c17747342444c67eeec21a506c89c1110e8 (diff) | |
download | haskell-e5523324d2c55e0091857e21bf5613b5f6b442a7.tar.gz |
Bignum: add integerNegate RULE
Diffstat (limited to 'libraries/ghc-bignum')
-rw-r--r-- | libraries/ghc-bignum/src/GHC/Num/Integer.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/ghc-bignum/src/GHC/Num/Integer.hs b/libraries/ghc-bignum/src/GHC/Num/Integer.hs index 43e4a18cdd..daa7ab8388 100644 --- a/libraries/ghc-bignum/src/GHC/Num/Integer.hs +++ b/libraries/ghc-bignum/src/GHC/Num/Integer.hs @@ -486,6 +486,9 @@ integerNegate (IP b) | isTrue# (bigNatEqWord# b ABS_INT_MINBOUND##) = IS INT_MINBOUND# | True = IN b +{-# RULES +"integerNegate/integerNegate" forall x. integerNegate (integerNegate x) = x +#-} -- | Compute absolute value of an 'Integer' integerAbs :: Integer -> Integer |