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

Safe HaskellSafe
LanguageHaskell2010

Copilot.Language.Operators.BitWise

Contents

Description

Bitwise operators.

Synopsis

Documentation

class Eq a => Bits a where #

The Bits class defines bitwise operations over integral types.

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

Methods

(.&.) :: 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 Bool 
Bits Int 

Methods

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

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

xor :: Int -> Int -> Int #

complement :: Int -> Int #

shift :: Int -> Int -> Int #

rotate :: Int -> Int -> Int #

zeroBits :: Int #

bit :: Int -> Int #

setBit :: Int -> Int -> Int #

clearBit :: Int -> Int -> Int #

complementBit :: Int -> Int -> Int #

testBit :: Int -> Int -> Bool #

bitSizeMaybe :: Int -> Maybe Int #

bitSize :: Int -> Int #

isSigned :: Int -> Bool #

shiftL :: Int -> Int -> Int #

unsafeShiftL :: Int -> Int -> Int #

shiftR :: Int -> Int -> Int #

unsafeShiftR :: Int -> Int -> Int #

rotateL :: Int -> Int -> Int #

rotateR :: Int -> Int -> Int #

popCount :: Int -> Int #

Bits Int8 
Bits Int16 
Bits Int32 
Bits Int64 
Bits Integer 
Bits Word 
Bits Word8 
Bits Word16 
Bits Word32 
Bits Word64 
Bits a => Bits (Identity a) 

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

(.<<.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #

(.>>.) :: (Bits a, Typed a, Typed b, Integral b) => Stream a -> Stream b -> Stream a Source #

Orphan instances

(Typed a, Bits a) => Bits (Stream a) Source # 

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 #

zeroBits :: Stream a #

bit :: 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 #

bitSize :: Stream a -> 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 #

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

popCount :: Stream a -> Int #