hw-bits-0.7.0.6: Bit manipulation

Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.Bits.BitWise

Contents

Synopsis

Bit map

class BitWise a where Source #

Class of values that have bit wise logical operations

Methods

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

Bit-wise AND

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

Bit-wise OR

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

Bit-wise XOR

comp :: a -> a Source #

Bit-wise complement

all0s :: a Source #

Bit-wise value of the given type with all bits set to zero

all1s :: a Source #

Bit-wise value of the given type with all bits set to one

Instances
BitWise Int Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

BitWise Word8 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

BitWise Word16 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

BitWise Word32 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

BitWise Word64 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

BitWise a => BitWise (Broadword a) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.Types.Broadword

BitWise a => BitWise (Builtin a) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.Types.Builtin

class Bit a where Source #

Methods

bit :: Position -> a Source #

Instances
Bit Bool Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Bool Source #

Bit Int Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Int Source #

Bit Word8 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Word8 Source #

Bit Word16 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Word16 Source #

Bit Word32 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Word32 Source #

Bit Word64 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

bit :: Position -> Word64 Source #

Bit (Naive Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Bit (Naive Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Bit (Naive Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Bit (Naive Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

class Shift a where Source #

Class of values that have shift operations

Methods

(.<.) :: a -> Count -> a infixl 8 Source #

Shift left by the specified count

(.>.) :: a -> Count -> a infixl 8 Source #

Shift right by the specified count

Instances
Shift Int Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.<.) :: Int -> Count -> Int Source #

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

Shift Word8 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Shift Word16 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Shift Word32 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Shift Word64 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

class TestBit a where Source #

Methods

(.?.) :: a -> Position -> Bool infixl 9 Source #

Test whether the bit ad the given offset is set

Instances
TestBit Bool Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Bool -> Position -> Bool Source #

TestBit Int Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Int -> Position -> Bool Source #

TestBit Word8 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Word8 -> Position -> Bool Source #

TestBit Word16 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Word16 -> Position -> Bool Source #

TestBit Word32 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Word32 -> Position -> Bool Source #

TestBit Word64 Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: Word64 -> Position -> Bool Source #

TestBit [Bool] Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

Methods

(.?.) :: [Bool] -> Position -> Bool Source #

TestBit (Naive Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Naive Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Naive Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Naive Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word8) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word16) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word32) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit (Vector Word64) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitWise

TestBit a => TestBit (BitShown a) Source # 
Instance details

Defined in HaskellWorks.Data.Bits.BitShown

Methods

(.?.) :: BitShown a -> Position -> Bool Source #