diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-06-11 21:50:04 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-06-11 23:32:29 +0100 |
commit | 72901d413187e1afade8f2f19a678ec3c9d402c4 (patch) | |
tree | 5cb3b4ce56766bd0cb2f8ed76456d182cd468f4a /libraries/base/GHC/Word.hs | |
parent | b9138a8921a76b2ac27ef24692f93508bea4d6c5 (diff) | |
download | haskell-72901d413187e1afade8f2f19a678ec3c9d402c4.tar.gz |
Revert "expose new Word operation to swap endianness for Word{16,32,64}"
This reverts commit 3ef0f91d4e9a3649581557ec4ba663db4306d7d5.
Diffstat (limited to 'libraries/base/GHC/Word.hs')
-rw-r--r-- | libraries/base/GHC/Word.hs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/libraries/base/GHC/Word.hs b/libraries/base/GHC/Word.hs index 3419a24d58..75957df704 100644 --- a/libraries/base/GHC/Word.hs +++ b/libraries/base/GHC/Word.hs @@ -23,10 +23,7 @@ module GHC.Word ( Word(..), Word8(..), Word16(..), Word32(..), Word64(..), uncheckedShiftL64#, - uncheckedShiftRL64#, - byteSwap16, - byteSwap32, - byteSwap64 + uncheckedShiftRL64# ) where import Data.Bits @@ -303,9 +300,6 @@ instance Bits Word16 where instance FiniteBits Word16 where finiteBitSize _ = 16 -byteSwap16 :: Word16 -> Word16 -byteSwap16 (W16# w#) = W16# (byteSwap16# w#) - {-# RULES "fromIntegral/Word8->Word16" fromIntegral = \(W8# x#) -> W16# x# "fromIntegral/Word16->Word16" fromIntegral = id :: Word16 -> Word16 @@ -530,9 +524,6 @@ instance Read Word32 where readsPrec p s = [(fromIntegral (x::Int), r) | (x, r) <- readsPrec p s] #endif -byteSwap32 :: Word32 -> Word32 -byteSwap32 (W32# w#) = W32# (byteSwap32# w#) - ------------------------------------------------------------------------ -- type Word64 ------------------------------------------------------------------------ @@ -781,10 +772,3 @@ instance Ix Word64 where instance Read Word64 where readsPrec p s = [(fromInteger x, r) | (x, r) <- readsPrec p s] -#if WORD_SIZE_IN_BITS < 64 -byteSwap64 :: Word64 -> Word64 -byteSwap64 (W64# w#) = W64# (byteSwap64# w#) -#else -byteSwap64 :: Word64 -> Word64 -byteSwap64 (W64# w#) = W64# (byteSwap# w#) -#endif |