Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bit rotations
Synopsis
- class RotatableBits a where
- rotate :: a -> Int -> a
- rotateL :: a -> Word -> a
- rotateR :: a -> Word -> a
- uncheckedRotate :: a -> Int -> a
- uncheckedRotateL :: a -> Word -> a
- uncheckedRotateR :: a -> Word -> a
Documentation
class RotatableBits a where Source #
Types whose bits can be rotated
Nothing
rotate :: a -> Int -> a Source #
Rotate left if positive, right if negative
rotate :: (FiniteBits a, KnownNat (BitSize a)) => a -> Int -> a Source #
Rotate left if positive, right if negative
rotateL :: a -> Word -> a Source #
Checked left bit rotation
rotateL :: (FiniteBits a, KnownNat (BitSize a)) => a -> Word -> a Source #
Checked left bit rotation
rotateR :: a -> Word -> a Source #
Checked right bit rotation
rotateR :: (FiniteBits a, KnownNat (BitSize a)) => a -> Word -> a Source #
Checked right bit rotation
uncheckedRotate :: a -> Int -> a Source #
Unchecked rotate left if positive, right if negative
uncheckedRotateL :: a -> Word -> a Source #
Unchecked left bit rotation
uncheckedRotateL :: (ShiftableBits a, FiniteBits a, KnownNat (BitSize a), Bitwise a) => a -> Word -> a Source #
Unchecked left bit rotation
uncheckedRotateR :: a -> Word -> a Source #
Unchecked right bit rotation
uncheckedRotateR :: (ShiftableBits a, FiniteBits a, KnownNat (BitSize a), Bitwise a) => a -> Word -> a Source #
Unchecked right bit rotation