Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Bitwise operators applied on streams, pointwise.
Documentation
The Bits
class defines bitwise operations over integral types.
- Bits are numbered from 0 with bit 0 being the least significant bit.
(.&.), (.|.), xor, complement, (shift | shiftL, shiftR), (rotate | rotateL, rotateR), bitSize, bitSizeMaybe, isSigned, testBit, bit, popCount
(.&.) :: a -> a -> a infixl 7 #
Bitwise "and"
(.|.) :: a -> a -> a infixl 5 #
Bitwise "or"
complement :: a -> a #
Reverse all the bits in the argument
Instances
(.<<.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #
Shifting values of a stream to the left.
(.>>.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #
Shifting values of a stream to the right.
Orphan instances
(Typed a, Bits a) => Bits (Stream a) Source # | Instance of the Only the methods |
(.&.) :: Stream a -> Stream a -> Stream a # (.|.) :: Stream a -> Stream a -> Stream a # xor :: Stream a -> Stream a -> Stream a # complement :: Stream a -> Stream a # shift :: Stream a -> Int -> Stream a # rotate :: Stream a -> Int -> Stream a # setBit :: Stream a -> Int -> Stream a # clearBit :: Stream a -> Int -> Stream a # complementBit :: Stream a -> Int -> Stream a # testBit :: Stream a -> Int -> Bool # bitSizeMaybe :: Stream a -> Maybe Int # isSigned :: Stream a -> Bool # shiftL :: Stream a -> Int -> Stream a # unsafeShiftL :: Stream a -> Int -> Stream a # shiftR :: Stream a -> Int -> Stream a # unsafeShiftR :: Stream a -> Int -> Stream a # rotateL :: Stream a -> Int -> Stream a # |