Commit 9acbeb5a authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent d07b8c7a
......@@ -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 #-}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment