copilot-language-4.6.1: A Haskell-embedded DSL for monitoring hard real-time distributed systems.

Safe Haskell | Safe
Language | Haskell2010

Copilot.Language.Operators.BitWise

Contents

- Orphan instances

Description

Bitwise operators applied on streams, pointwise.

Synopsis

- class Eq a => Bits a where
  - (.&.) :: a -> a -> a
  - (.|.) :: a -> a -> a
  - complement :: a -> a
- (.^.) :: Bits a => a -> a -> a
- (.<<.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a
- (.>>.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a

# Documentation

class Eq a => Bits a where Source #

The `Bits` class defines bitwise operations over integral types.

- Bits are numbered from 0 with bit 0 being the least significant bit.

Minimal complete definition

(.&.), (.|.), xor, complement, (shift | shiftL, shiftR), (rotate | rotateL, rotateR), bitSize, bitSizeMaybe, isSigned, testBit, bit, popCount

Methods

(.&.) :: a -> a -> a infixl 7 Source #

Bitwise "and"

(.|.) :: a -> a -> a infixl 5 Source #

Bitwise "or"

complement :: a -> a Source #

Reverse all the bits in the argument

#### Instances

Instances details

Bits Int16 | Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

(.&.) :: Int16 -> Int16 -> Int16 Source #

(.|.) :: Int16 -> Int16 -> Int16 Source #

xor :: Int16 -> Int16 -> Int16 Source #

complement :: Int16 -> Int16 Source #

shift :: Int16 -> Int -> Int16 Source #

rotate :: Int16 -> Int -> Int16 Source #

zeroBits :: Int16 Source #

bit :: Int -> Int16 Source #

setBit :: Int16 -> Int -> Int16 Source #

clearBit :: Int16 -> Int -> Int16 Source #

complementBit :: Int16 -> Int -> Int16 Source #

testBit :: Int16 -> Int -> Bool Source #

bitSizeMaybe :: Int16 -> Maybe Int Source #

bitSize :: Int16 -> Int Source #

isSigned :: Int16 -> Bool Source #

shiftL :: Int16 -> Int -> Int16 Source #

unsafeShiftL :: Int16 -> Int -> Int16 Source #

shiftR :: Int16 -> Int -> Int16 Source #

unsafeShiftR :: Int16 -> Int -> Int16 Source #

rotateL :: Int16 -> Int -> Int16 Source #

rotateR :: Int16 -> Int -> Int16 Source #

popCount :: Int16 -> Int Source #

Bits Int32 | Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

(.&.) :: Int32 -> Int32 -> Int32 Source #

(.|.) :: Int32 -> Int32 -> Int32 Source #

xor :: Int32 -> Int32 -> Int32 Source #

complement :: Int32 -> Int32 Source #

shift :: Int32 -> Int -> Int32 Source #

rotate :: Int32 -> Int -> Int32 Source #

zeroBits :: Int32 Source #

bit :: Int -> Int32 Source #

setBit :: Int32 -> Int -> Int32 Source #

clearBit :: Int32 -> Int -> Int32 Source #

complementBit :: Int32 -> Int -> Int32 Source #

testBit :: Int32 -> Int -> Bool Source #

bitSizeMaybe :: Int32 -> Maybe Int Source #

bitSize :: Int32 -> Int Source #

isSigned :: Int32 -> Bool Source #

shiftL :: Int32 -> Int -> Int32 Source #

unsafeShiftL :: Int32 -> Int -> Int32 Source #

shiftR :: Int32 -> Int -> Int32 Source #

unsafeShiftR :: Int32 -> Int -> Int32 Source #

rotateL :: Int32 -> Int -> Int32 Source #

rotateR :: Int32 -> Int -> Int32 Source #

popCount :: Int32 -> Int Source #

Bits Int64 | Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

(.&.) :: Int64 -> Int64 -> Int64 Source #

(.|.) :: Int64 -> Int64 -> Int64 Source #

xor :: Int64 -> Int64 -> Int64 Source #

complement :: Int64 -> Int64 Source #

shift :: Int64 -> Int -> Int64 Source #

rotate :: Int64 -> Int -> Int64 Source #

zeroBits :: Int64 Source #

bit :: Int -> Int64 Source #

setBit :: Int64 -> Int -> Int64 Source #

clearBit :: Int64 -> Int -> Int64 Source #

complementBit :: Int64 -> Int -> Int64 Source #

testBit :: Int64 -> Int -> Bool Source #

bitSizeMaybe :: Int64 -> Maybe Int Source #

bitSize :: Int64 -> Int Source #

isSigned :: Int64 -> Bool Source #

shiftL :: Int64 -> Int -> Int64 Source #

unsafeShiftL :: Int64 -> Int -> Int64 Source #

shiftR :: Int64 -> Int -> Int64 Source #

unsafeShiftR :: Int64 -> Int -> Int64 Source #

rotateL :: Int64 -> Int -> Int64 Source #

rotateR :: Int64 -> Int -> Int64 Source #

popCount :: Int64 -> Int Source #

Bits Int8 | Since: base-2.1

Instance details

Defined in GHC.Internal.Int

Methods

(.&.) :: Int8 -> Int8 -> Int8 Source #

(.|.) :: Int8 -> Int8 -> Int8 Source #

xor :: Int8 -> Int8 -> Int8 Source #

complement :: Int8 -> Int8 Source #

shift :: Int8 -> Int -> Int8 Source #

rotate :: Int8 -> Int -> Int8 Source #

zeroBits :: Int8 Source #

bit :: Int -> Int8 Source #

setBit :: Int8 -> Int -> Int8 Source #

clearBit :: Int8 -> Int -> Int8 Source #

complementBit :: Int8 -> Int -> Int8 Source #

testBit :: Int8 -> Int -> Bool Source #

bitSizeMaybe :: Int8 -> Maybe Int Source #

bitSize :: Int8 -> Int Source #

isSigned :: Int8 -> Bool Source #

shiftL :: Int8 -> Int -> Int8 Source #

unsafeShiftL :: Int8 -> Int -> Int8 Source #

shiftR :: Int8 -> Int -> Int8 Source #

unsafeShiftR :: Int8 -> Int -> Int8 Source #

rotateL :: Int8 -> Int -> Int8 Source #

rotateR :: Int8 -> Int -> Int8 Source #

popCount :: Int8 -> Int Source #

Bits Word16 | Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

(.&.) :: Word16 -> Word16 -> Word16 Source #

(.|.) :: Word16 -> Word16 -> Word16 Source #

xor :: Word16 -> Word16 -> Word16 Source #

complement :: Word16 -> Word16 Source #

shift :: Word16 -> Int -> Word16 Source #

rotate :: Word16 -> Int -> Word16 Source #

zeroBits :: Word16 Source #

bit :: Int -> Word16 Source #

setBit :: Word16 -> Int -> Word16 Source #

clearBit :: Word16 -> Int -> Word16 Source #

complementBit :: Word16 -> Int -> Word16 Source #

testBit :: Word16 -> Int -> Bool Source #

bitSizeMaybe :: Word16 -> Maybe Int Source #

bitSize :: Word16 -> Int Source #

isSigned :: Word16 -> Bool Source #

shiftL :: Word16 -> Int -> Word16 Source #

unsafeShiftL :: Word16 -> Int -> Word16 Source #

shiftR :: Word16 -> Int -> Word16 Source #

unsafeShiftR :: Word16 -> Int -> Word16 Source #

rotateL :: Word16 -> Int -> Word16 Source #

rotateR :: Word16 -> Int -> Word16 Source #

popCount :: Word16 -> Int Source #

Bits Word32 | Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

(.&.) :: Word32 -> Word32 -> Word32 Source #

(.|.) :: Word32 -> Word32 -> Word32 Source #

xor :: Word32 -> Word32 -> Word32 Source #

complement :: Word32 -> Word32 Source #

shift :: Word32 -> Int -> Word32 Source #

rotate :: Word32 -> Int -> Word32 Source #

zeroBits :: Word32 Source #

bit :: Int -> Word32 Source #

setBit :: Word32 -> Int -> Word32 Source #

clearBit :: Word32 -> Int -> Word32 Source #

complementBit :: Word32 -> Int -> Word32 Source #

testBit :: Word32 -> Int -> Bool Source #

bitSizeMaybe :: Word32 -> Maybe Int Source #

bitSize :: Word32 -> Int Source #

isSigned :: Word32 -> Bool Source #

shiftL :: Word32 -> Int -> Word32 Source #

unsafeShiftL :: Word32 -> Int -> Word32 Source #

shiftR :: Word32 -> Int -> Word32 Source #

unsafeShiftR :: Word32 -> Int -> Word32 Source #

rotateL :: Word32 -> Int -> Word32 Source #

rotateR :: Word32 -> Int -> Word32 Source #

popCount :: Word32 -> Int Source #

Bits Word64 | Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

(.&.) :: Word64 -> Word64 -> Word64 Source #

(.|.) :: Word64 -> Word64 -> Word64 Source #

xor :: Word64 -> Word64 -> Word64 Source #

complement :: Word64 -> Word64 Source #

shift :: Word64 -> Int -> Word64 Source #

rotate :: Word64 -> Int -> Word64 Source #

zeroBits :: Word64 Source #

bit :: Int -> Word64 Source #

setBit :: Word64 -> Int -> Word64 Source #

clearBit :: Word64 -> Int -> Word64 Source #

complementBit :: Word64 -> Int -> Word64 Source #

testBit :: Word64 -> Int -> Bool Source #

bitSizeMaybe :: Word64 -> Maybe Int Source #

bitSize :: Word64 -> Int Source #

isSigned :: Word64 -> Bool Source #

shiftL :: Word64 -> Int -> Word64 Source #

unsafeShiftL :: Word64 -> Int -> Word64 Source #

shiftR :: Word64 -> Int -> Word64 Source #

unsafeShiftR :: Word64 -> Int -> Word64 Source #

rotateL :: Word64 -> Int -> Word64 Source #

rotateR :: Word64 -> Int -> Word64 Source #

popCount :: Word64 -> Int Source #

Bits Word8 | Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

(.&.) :: Word8 -> Word8 -> Word8 Source #

(.|.) :: Word8 -> Word8 -> Word8 Source #

xor :: Word8 -> Word8 -> Word8 Source #

complement :: Word8 -> Word8 Source #

shift :: Word8 -> Int -> Word8 Source #

rotate :: Word8 -> Int -> Word8 Source #

zeroBits :: Word8 Source #

bit :: Int -> Word8 Source #

setBit :: Word8 -> Int -> Word8 Source #

clearBit :: Word8 -> Int -> Word8 Source #

complementBit :: Word8 -> Int -> Word8 Source #

testBit :: Word8 -> Int -> Bool Source #

bitSizeMaybe :: Word8 -> Maybe Int Source #

bitSize :: Word8 -> Int Source #

isSigned :: Word8 -> Bool Source #

shiftL :: Word8 -> Int -> Word8 Source #

unsafeShiftL :: Word8 -> Int -> Word8 Source #

shiftR :: Word8 -> Int -> Word8 Source #

unsafeShiftR :: Word8 -> Int -> Word8 Source #

rotateL :: Word8 -> Int -> Word8 Source #

rotateR :: Word8 -> Int -> Word8 Source #

popCount :: Word8 -> Int Source #

Bits Integer | Since: base-2.1

Instance details

Defined in GHC.Internal.Bits

Methods

(.&.) :: Integer -> Integer -> Integer Source #

(.|.) :: Integer -> Integer -> Integer Source #

xor :: Integer -> Integer -> Integer Source #

complement :: Integer -> Integer Source #

shift :: Integer -> Int -> Integer Source #

rotate :: Integer -> Int -> Integer Source #

zeroBits :: Integer Source #

bit :: Int -> Integer Source #

setBit :: Integer -> Int -> Integer Source #

clearBit :: Integer -> Int -> Integer Source #

complementBit :: Integer -> Int -> Integer Source #

testBit :: Integer -> Int -> Bool Source #

bitSizeMaybe :: Integer -> Maybe Int Source #

bitSize :: Integer -> Int Source #

isSigned :: Integer -> Bool Source #

shiftL :: Integer -> Int -> Integer Source #

unsafeShiftL :: Integer -> Int -> Integer Source #

shiftR :: Integer -> Int -> Integer Source #

unsafeShiftR :: Integer -> Int -> Integer Source #

rotateL :: Integer -> Int -> Integer Source #

rotateR :: Integer -> Int -> Integer Source #

popCount :: Integer -> Int Source #

Bits Natural | Since: base-4.8.0

Instance details

Defined in GHC.Internal.Bits

Methods

(.&.) :: Natural -> Natural -> Natural Source #

(.|.) :: Natural -> Natural -> Natural Source #

xor :: Natural -> Natural -> Natural Source #

complement :: Natural -> Natural Source #

shift :: Natural -> Int -> Natural Source #

rotate :: Natural -> Int -> Natural Source #

zeroBits :: Natural Source #

bit :: Int -> Natural Source #

setBit :: Natural -> Int -> Natural Source #

clearBit :: Natural -> Int -> Natural Source #

complementBit :: Natural -> Int -> Natural Source #

testBit :: Natural -> Int -> Bool Source #

bitSizeMaybe :: Natural -> Maybe Int Source #

bitSize :: Natural -> Int Source #

isSigned :: Natural -> Bool Source #

shiftL :: Natural -> Int -> Natural Source #

unsafeShiftL :: Natural -> Int -> Natural Source #

shiftR :: Natural -> Int -> Natural Source #

unsafeShiftR :: Natural -> Int -> Natural Source #

rotateL :: Natural -> Int -> Natural Source #

rotateR :: Natural -> Int -> Natural Source #

popCount :: Natural -> Int Source #

Bits Bool | Interpret `Bool` as 1-bit bit-field Since: base-4.7.0.0

Instance details

Defined in GHC.Internal.Bits

Methods

(.&.) :: Bool -> Bool -> Bool Source #

(.|.) :: Bool -> Bool -> Bool Source #

xor :: Bool -> Bool -> Bool Source #

complement :: Bool -> Bool Source #

shift :: Bool -> Int -> Bool Source #

rotate :: Bool -> Int -> Bool Source #

zeroBits :: Bool Source #

bit :: Int -> Bool Source #

setBit :: Bool -> Int -> Bool Source #

clearBit :: Bool -> Int -> Bool Source #

complementBit :: Bool -> Int -> Bool Source #

testBit :: Bool -> Int -> Bool Source #

bitSizeMaybe :: Bool -> Maybe Int Source #

bitSize :: Bool -> Int Source #

isSigned :: Bool -> Bool Source #

shiftL :: Bool -> Int -> Bool Source #

unsafeShiftL :: Bool -> Int -> Bool Source #

shiftR :: Bool -> Int -> Bool Source #

unsafeShiftR :: Bool -> Int -> Bool Source #

rotateL :: Bool -> Int -> Bool Source #

rotateR :: Bool -> Int -> Bool Source #

popCount :: Bool -> Int Source #

Bits Int | Since: base-2.1

Instance details

Defined in GHC.Internal.Bits

Methods

(.&.) :: Int -> Int -> Int Source #

(.|.) :: Int -> Int -> Int Source #

xor :: Int -> Int -> Int Source #

complement :: Int -> Int Source #

shift :: Int -> Int -> Int Source #

rotate :: Int -> Int -> Int Source #

zeroBits :: Int Source #

bit :: Int -> Int Source #

setBit :: Int -> Int -> Int Source #

clearBit :: Int -> Int -> Int Source #

complementBit :: Int -> Int -> Int Source #

testBit :: Int -> Int -> Bool Source #

bitSizeMaybe :: Int -> Maybe Int Source #

bitSize :: Int -> Int Source #

isSigned :: Int -> Bool Source #

shiftL :: Int -> Int -> Int Source #

unsafeShiftL :: Int -> Int -> Int Source #

shiftR :: Int -> Int -> Int Source #

unsafeShiftR :: Int -> Int -> Int Source #

rotateL :: Int -> Int -> Int Source #

rotateR :: Int -> Int -> Int Source #

popCount :: Int -> Int Source #

Bits Word | Since: base-2.1

Instance details

Defined in GHC.Internal.Bits

Methods

(.&.) :: Word -> Word -> Word Source #

(.|.) :: Word -> Word -> Word Source #

xor :: Word -> Word -> Word Source #

complement :: Word -> Word Source #

shift :: Word -> Int -> Word Source #

rotate :: Word -> Int -> Word Source #

zeroBits :: Word Source #

bit :: Int -> Word Source #

setBit :: Word -> Int -> Word Source #

clearBit :: Word -> Int -> Word Source #

complementBit :: Word -> Int -> Word Source #

testBit :: Word -> Int -> Bool Source #

bitSizeMaybe :: Word -> Maybe Int Source #

bitSize :: Word -> Int Source #

isSigned :: Word -> Bool Source #

shiftL :: Word -> Int -> Word Source #

unsafeShiftL :: Word -> Int -> Word Source #

shiftR :: Word -> Int -> Word Source #

unsafeShiftR :: Word -> Int -> Word Source #

rotateL :: Word -> Int -> Word Source #

rotateR :: Word -> Int -> Word Source #

popCount :: Word -> Int Source #

(Typed a, Bits a) => Bits (Stream a) Source # | Instance of the `Bits` class for `Stream`s. Only the methods `.&.`, `complement`, `.|.` and `xor` are defined.

Instance details

Defined in Copilot.Language.Operators.BitWise

Methods

(.&.) :: Stream a -> Stream a -> Stream a Source #

(.|.) :: Stream a -> Stream a -> Stream a Source #

xor :: Stream a -> Stream a -> Stream a Source #

complement :: Stream a -> Stream a Source #

shift :: Stream a -> Int -> Stream a Source #

rotate :: Stream a -> Int -> Stream a Source #

zeroBits :: Stream a Source #

bit :: Int -> Stream a Source #

setBit :: Stream a -> Int -> Stream a Source #

clearBit :: Stream a -> Int -> Stream a Source #

complementBit :: Stream a -> Int -> Stream a Source #

testBit :: Stream a -> Int -> Bool Source #

bitSizeMaybe :: Stream a -> Maybe Int Source #

bitSize :: Stream a -> Int Source #

isSigned :: Stream a -> Bool Source #

shiftL :: Stream a -> Int -> Stream a Source #

unsafeShiftL :: Stream a -> Int -> Stream a Source #

shiftR :: Stream a -> Int -> Stream a Source #

unsafeShiftR :: Stream a -> Int -> Stream a Source #

rotateL :: Stream a -> Int -> Stream a Source #

rotateR :: Stream a -> Int -> Stream a Source #

popCount :: Stream a -> Int Source #

Bits a => Bits (And a) | Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

(.&.) :: And a -> And a -> And a Source #

(.|.) :: And a -> And a -> And a Source #

xor :: And a -> And a -> And a Source #

complement :: And a -> And a Source #

shift :: And a -> Int -> And a Source #

rotate :: And a -> Int -> And a Source #

zeroBits :: And a Source #

bit :: Int -> And a Source #

setBit :: And a -> Int -> And a Source #

clearBit :: And a -> Int -> And a Source #

complementBit :: And a -> Int -> And a Source #

testBit :: And a -> Int -> Bool Source #

bitSizeMaybe :: And a -> Maybe Int Source #

bitSize :: And a -> Int Source #

isSigned :: And a -> Bool Source #

shiftL :: And a -> Int -> And a Source #

unsafeShiftL :: And a -> Int -> And a Source #

shiftR :: And a -> Int -> And a Source #

unsafeShiftR :: And a -> Int -> And a Source #

rotateL :: And a -> Int -> And a Source #

rotateR :: And a -> Int -> And a Source #

popCount :: And a -> Int Source #

Bits a => Bits (Iff a) | Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

(.&.) :: Iff a -> Iff a -> Iff a Source #

(.|.) :: Iff a -> Iff a -> Iff a Source #

xor :: Iff a -> Iff a -> Iff a Source #

complement :: Iff a -> Iff a Source #

shift :: Iff a -> Int -> Iff a Source #

rotate :: Iff a -> Int -> Iff a Source #

zeroBits :: Iff a Source #

bit :: Int -> Iff a Source #

setBit :: Iff a -> Int -> Iff a Source #

clearBit :: Iff a -> Int -> Iff a Source #

complementBit :: Iff a -> Int -> Iff a Source #

testBit :: Iff a -> Int -> Bool Source #

bitSizeMaybe :: Iff a -> Maybe Int Source #

bitSize :: Iff a -> Int Source #

isSigned :: Iff a -> Bool Source #

shiftL :: Iff a -> Int -> Iff a Source #

unsafeShiftL :: Iff a -> Int -> Iff a Source #

shiftR :: Iff a -> Int -> Iff a Source #

unsafeShiftR :: Iff a -> Int -> Iff a Source #

rotateL :: Iff a -> Int -> Iff a Source #

rotateR :: Iff a -> Int -> Iff a Source #

popCount :: Iff a -> Int Source #

Bits a => Bits (Ior a) | Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

(.&.) :: Ior a -> Ior a -> Ior a Source #

(.|.) :: Ior a -> Ior a -> Ior a Source #

xor :: Ior a -> Ior a -> Ior a Source #

complement :: Ior a -> Ior a Source #

shift :: Ior a -> Int -> Ior a Source #

rotate :: Ior a -> Int -> Ior a Source #

zeroBits :: Ior a Source #

bit :: Int -> Ior a Source #

setBit :: Ior a -> Int -> Ior a Source #

clearBit :: Ior a -> Int -> Ior a Source #

complementBit :: Ior a -> Int -> Ior a Source #

testBit :: Ior a -> Int -> Bool Source #

bitSizeMaybe :: Ior a -> Maybe Int Source #

bitSize :: Ior a -> Int Source #

isSigned :: Ior a -> Bool Source #

shiftL :: Ior a -> Int -> Ior a Source #

unsafeShiftL :: Ior a -> Int -> Ior a Source #

shiftR :: Ior a -> Int -> Ior a Source #

unsafeShiftR :: Ior a -> Int -> Ior a Source #

rotateL :: Ior a -> Int -> Ior a Source #

rotateR :: Ior a -> Int -> Ior a Source #

popCount :: Ior a -> Int Source #

Bits a => Bits (Xor a) | Since: base-4.16

Instance details

Defined in GHC.Internal.Data.Bits

Methods

(.&.) :: Xor a -> Xor a -> Xor a Source #

(.|.) :: Xor a -> Xor a -> Xor a Source #

xor :: Xor a -> Xor a -> Xor a Source #

complement :: Xor a -> Xor a Source #

shift :: Xor a -> Int -> Xor a Source #

rotate :: Xor a -> Int -> Xor a Source #

zeroBits :: Xor a Source #

bit :: Int -> Xor a Source #

setBit :: Xor a -> Int -> Xor a Source #

clearBit :: Xor a -> Int -> Xor a Source #

complementBit :: Xor a -> Int -> Xor a Source #

testBit :: Xor a -> Int -> Bool Source #

bitSizeMaybe :: Xor a -> Maybe Int Source #

bitSize :: Xor a -> Int Source #

isSigned :: Xor a -> Bool Source #

shiftL :: Xor a -> Int -> Xor a Source #

unsafeShiftL :: Xor a -> Int -> Xor a Source #

shiftR :: Xor a -> Int -> Xor a Source #

unsafeShiftR :: Xor a -> Int -> Xor a Source #

rotateL :: Xor a -> Int -> Xor a Source #

rotateR :: Xor a -> Int -> Xor a Source #

popCount :: Xor a -> Int Source #

Bits a => Bits (Identity a) | Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Functor.Identity

Methods

(.&.) :: Identity a -> Identity a -> Identity a Source #

(.|.) :: Identity a -> Identity a -> Identity a Source #

xor :: Identity a -> Identity a -> Identity a Source #

complement :: Identity a -> Identity a Source #

shift :: Identity a -> Int -> Identity a Source #

rotate :: Identity a -> Int -> Identity a Source #

zeroBits :: Identity a Source #

bit :: Int -> Identity a Source #

setBit :: Identity a -> Int -> Identity a Source #

clearBit :: Identity a -> Int -> Identity a Source #

complementBit :: Identity a -> Int -> Identity a Source #

testBit :: Identity a -> Int -> Bool Source #

bitSizeMaybe :: Identity a -> Maybe Int Source #

bitSize :: Identity a -> Int Source #

isSigned :: Identity a -> Bool Source #

shiftL :: Identity a -> Int -> Identity a Source #

unsafeShiftL :: Identity a -> Int -> Identity a Source #

shiftR :: Identity a -> Int -> Identity a Source #

unsafeShiftR :: Identity a -> Int -> Identity a Source #

rotateL :: Identity a -> Int -> Identity a Source #

rotateR :: Identity a -> Int -> Identity a Source #

popCount :: Identity a -> Int Source #

(.^.) :: Bits a => a -> a -> a infixl 6 Source #

Infix version of `xor`.

Since: base-4.17

(.<<.) :: (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 `Bits` class for `Stream`s. Only the methods `.&.`, `complement`, `.|.` and `xor` are defined.

Instance details

Methods

(.&.) :: Stream a -> Stream a -> Stream a Source #

(.|.) :: Stream a -> Stream a -> Stream a Source #

xor :: Stream a -> Stream a -> Stream a Source #

complement :: Stream a -> Stream a Source #

shift :: Stream a -> Int -> Stream a Source #

rotate :: Stream a -> Int -> Stream a Source #

zeroBits :: Stream a Source #

bit :: Int -> Stream a Source #

setBit :: Stream a -> Int -> Stream a Source #

clearBit :: Stream a -> Int -> Stream a Source #

complementBit :: Stream a -> Int -> Stream a Source #

testBit :: Stream a -> Int -> Bool Source #

bitSizeMaybe :: Stream a -> Maybe Int Source #

bitSize :: Stream a -> Int Source #

isSigned :: Stream a -> Bool Source #

shiftL :: Stream a -> Int -> Stream a Source #

unsafeShiftL :: Stream a -> Int -> Stream a Source #

shiftR :: Stream a -> Int -> Stream a Source #

unsafeShiftR :: Stream a -> Int -> Stream a Source #

rotateL :: Stream a -> Int -> Stream a Source #

rotateR :: Stream a -> Int -> Stream a Source #

popCount :: Stream a -> Int Source #