[commit: ghc] master: integer-gmp: Fix style (9acbeb5)
git at git.haskell.org
git at git.haskell.org
Tue Sep 26 02:44:33 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9acbeb5a4f923726a847da4db03ca4f540ea478b/ghc
>---------------------------------------------------------------
commit 9acbeb5a4f923726a847da4db03ca4f540ea478b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Sep 25 18:34:13 2017 -0400
integer-gmp: Fix style
Just fix a few inconsistencies that I encountered.
[skip ci]
Reviewers: austin, hvr, goldfire
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4024
>---------------------------------------------------------------
9acbeb5a4f923726a847da4db03ca4f540ea478b
libraries/integer-gmp/src/GHC/Integer/Type.hs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libraries/integer-gmp/src/GHC/Integer/Type.hs b/libraries/integer-gmp/src/GHC/Integer/Type.hs
index cb1ceec..5815950 100644
--- a/libraries/integer-gmp/src/GHC/Integer/Type.hs
+++ b/libraries/integer-gmp/src/GHC/Integer/Type.hs
@@ -587,15 +587,15 @@ shiftRInteger (Jn# bn) n#
-- Even though the shift-amount is expressed as `Int#`, the result is
-- undefined for negative shift-amounts.
shiftLInteger :: Integer -> Int# -> Integer
-shiftLInteger x 0# = x
+shiftLInteger x 0# = x
shiftLInteger (S# 0#) _ = S# 0#
shiftLInteger (S# 1#) n# = bitInteger n#
shiftLInteger (S# i#) n#
- | isTrue# (i# >=# 0#) = bigNatToInteger (shiftLBigNat
- (wordToBigNat (int2Word# i#)) n#)
- | True = bigNatToNegInteger (shiftLBigNat
- (wordToBigNat (int2Word#
- (negateInt# i#))) n#)
+ | isTrue# (i# >=# 0#) = bigNatToInteger (shiftLBigNat
+ (wordToBigNat (int2Word# i#)) n#)
+ | True = bigNatToNegInteger (shiftLBigNat
+ (wordToBigNat (int2Word#
+ (negateInt# i#))) n#)
shiftLInteger (Jp# bn) n# = Jp# (shiftLBigNat bn n#)
shiftLInteger (Jn# bn) n# = Jn# (shiftLBigNat bn n#)
{-# CONSTANT_FOLDED shiftLInteger #-}
More information about the ghc-commits
mailing list