hw-bits-0.0.0.10: Conduits for tokenizing streams.

Copyright2016 John Ky
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

HaskellWorks.Data.Bits.BitWise

Contents

Description

Succinct operations.

Synopsis

Bit map

class BitWise a where Source #

Class of values that have bit wise logical operations

Minimal complete definition

(.&.), (.|.), (.^.), comp, all0s, all1s

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 # 
BitWise Word8 Source # 
BitWise Word16 Source # 
BitWise Word32 Source # 
BitWise Word64 Source # 
BitWise a => BitWise (Broadword a) Source # 
BitWise a => BitWise (Builtin a) Source # 

class Shift a where Source #

Class of values that have shift operations

Minimal complete definition

(.<.), (.>.)

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

class TestBit a where Source #

Minimal complete definition

(.?.)

Methods

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

Test whether the bit ad the given offset is set