diff options
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/Data/Bits.hs | 7 | ||||
-rw-r--r-- | libraries/base/Data/Fixed.hs | 3 | ||||
-rw-r--r-- | libraries/base/GHC/Int.hs | 8 | ||||
-rw-r--r-- | libraries/base/Prelude.hs | 2 |
4 files changed, 9 insertions, 11 deletions
diff --git a/libraries/base/Data/Bits.hs b/libraries/base/Data/Bits.hs index a751176441..532f5d5617 100644 --- a/libraries/base/Data/Bits.hs +++ b/libraries/base/Data/Bits.hs @@ -445,7 +445,7 @@ instance Bits Int where (I# x#) `shiftR` (I# i#) = I# (x# `iShiftRA#` i#) (I# x#) `unsafeShiftR` (I# i#) = I# (x# `uncheckedIShiftRA#` i#) - {-# INLINE rotate #-} -- See Note [Constant folding for rotate] + {-# INLINE rotate #-} -- See Note [Constant folding for rotate] (I# x#) `rotate` (I# i#) = I# ((x# `uncheckedIShiftL#` i'#) `orI#` (x# `uncheckedIShiftRL#` (wsib -# i'#))) where @@ -520,8 +520,8 @@ instance Bits Integer where bitSize _ = error "Data.Bits.bitSize(Integer)" isSigned _ = True -{- Note [Constant folding for rotate] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{- Note [Constant folding for rotate] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The INLINE on the Int instance of rotate enables it to be constant folded. For example: sumU . mapU (`rotate` 3) . replicateU 10000000 $ (7 :: Int) @@ -544,4 +544,3 @@ own to enable constant folding; for example 'shift': 10000000 -> ww_sOb } -} - diff --git a/libraries/base/Data/Fixed.hs b/libraries/base/Data/Fixed.hs index cadbb61ac1..8e8ea60ebe 100644 --- a/libraries/base/Data/Fixed.hs +++ b/libraries/base/Data/Fixed.hs @@ -8,7 +8,7 @@ -- Module : Data.Fixed -- Copyright : (c) Ashley Yakeley 2005, 2006, 2009 -- License : BSD-style (see the file libraries/base/LICENSE) --- +-- -- Maintainer : Ashley Yakeley <ashley@semantic.org> -- Stability : experimental -- Portability : portable @@ -215,4 +215,3 @@ instance HasResolution E12 where resolution _ = 1000000000000 -- | resolution of 10^-12 = .000000000001 type Pico = Fixed E12 - diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs index a9743ce1a0..b8e05e2c5b 100644 --- a/libraries/base/GHC/Int.hs +++ b/libraries/base/GHC/Int.hs @@ -704,12 +704,12 @@ instance Bits Int64 where iShiftL64#, iShiftRA64# :: Int64# -> Int# -> Int64# a `iShiftL64#` b | isTrue# (b >=# 64#) = intToInt64# 0# - | otherwise = a `uncheckedIShiftL64#` b + | otherwise = a `uncheckedIShiftL64#` b a `iShiftRA64#` b | isTrue# (b >=# 64#) = if isTrue# (a `ltInt64#` (intToInt64# 0#)) - then intToInt64# (-1#) - else intToInt64# 0# - | otherwise = a `uncheckedIShiftRA64#` b + then intToInt64# (-1#) + else intToInt64# 0# + | otherwise = a `uncheckedIShiftRA64#` b {-# RULES "fromIntegral/Int->Int64" fromIntegral = \(I# x#) -> I64# (intToInt64# x#) diff --git a/libraries/base/Prelude.hs b/libraries/base/Prelude.hs index 3a3cc4dcc2..687dcc6854 100644 --- a/libraries/base/Prelude.hs +++ b/libraries/base/Prelude.hs @@ -6,7 +6,7 @@ -- Module : Prelude -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) --- +-- -- Maintainer : libraries@haskell.org -- Stability : stable -- Portability : portable |