| otherwise = W# (x# `shiftRL#` negateInt# i#)
(W# x#) `rotate` (I# i#)
| i'# ==# 0# = W# x#
- | otherwise = W# ((x# `shiftL#` i'#) `or#` (x# `shiftRL#` (wsib -# i'#)))
+ | otherwise = W# ((x# `uncheckedShiftL#` i'#) `or#` (x# `uncheckedShiftRL#` (wsib -# i'#)))
where
i'# = word2Int# (int2Word# i# `and#` int2Word# (wsib -# 1#))
wsib = WORD_SIZE_IN_BITS# {- work around preprocessor problem (??) -}
| otherwise = W8# (x# `shiftRL#` negateInt# i#)
(W8# x#) `rotate` (I# i#)
| i'# ==# 0# = W8# x#
- | otherwise = W8# (narrow8Word# ((x# `shiftL#` i'#) `or#`
- (x# `shiftRL#` (8# -# i'#))))
+ | otherwise = W8# (narrow8Word# ((x# `uncheckedShiftL#` i'#) `or#`
+ (x# `uncheckedShiftRL#` (8# -# i'#))))
where
i'# = word2Int# (int2Word# i# `and#` int2Word# 7#)
bitSize _ = 8
| otherwise = W16# (x# `shiftRL#` negateInt# i#)
(W16# x#) `rotate` (I# i#)
| i'# ==# 0# = W16# x#
- | otherwise = W16# (narrow16Word# ((x# `shiftL#` i'#) `or#`
- (x# `shiftRL#` (16# -# i'#))))
+ | otherwise = W16# (narrow16Word# ((x# `uncheckedShiftL#` i'#) `or#`
+ (x# `uncheckedShiftRL#` (16# -# i'#))))
where
i'# = word2Int# (int2Word# i# `and#` int2Word# 15#)
bitSize _ = 16
| otherwise = W32# (x# `shiftRL#` negateInt# i#)
(W32# x#) `rotate` (I# i#)
| i'# ==# 0# = W32# x#
- | otherwise = W32# (narrow32Word# ((x# `shiftL#` i'#) `or#`
- (x# `shiftRL#` (32# -# i'#))))
+ | otherwise = W32# (narrow32Word# ((x# `uncheckedShiftL#` i'#) `or#`
+ (x# `uncheckedShiftRL#` (32# -# i'#))))
where
i'# = word2Int# (int2Word# i# `and#` int2Word# 31#)
bitSize _ = 32
| otherwise = W64# (x# `shiftRL#` negateInt# i#)
(W64# x#) `rotate` (I# i#)
| i'# ==# 0# = W64# x#
- | otherwise = W64# ((x# `shiftL#` i'#) `or#`
- (x# `shiftRL#` (64# -# i'#)))
+ | otherwise = W64# ((x# `uncheckedShiftL#` i'#) `or#`
+ (x# `uncheckedShiftRL#` (64# -# i'#)))
where
i'# = word2Int# (int2Word# i# `and#` int2Word# 63#)
bitSize _ = 64