Module

Data.Binary

Package
purescript-binary
Repository
Unisay/purescript-binary

#Binary Source

class Binary a  where

Members

Instances

#isOdd Source

isOdd :: forall a. Binary a => a -> Boolean

#isEven Source

isEven :: forall a. Binary a => a -> Boolean

#isZero Source

isZero :: forall a. Binary a => a -> Boolean

#unsafeFromBits Source

unsafeFromBits :: forall a. Binary a => Bits -> a

#unsafeRightShift Source

unsafeRightShift :: forall a. Binary a => a -> a

#unsafeLeftShift Source

unsafeLeftShift :: forall a. Binary a => a -> a

#Elastic Source

class (Binary a) <= Elastic a  where

Members

Instances

#addLeadingZeros Source

addLeadingZeros :: forall a. Elastic a => Int -> a -> a

#addLeadingBit Source

addLeadingBit :: forall a. Elastic a => Bit -> Int -> a -> a

#stripLeadingZeros Source

stripLeadingZeros :: forall a. Elastic a => a -> a

#stripLeadingBit Source

stripLeadingBit :: forall a. Elastic a => Bit -> a -> a

#tryFromBinStringElastic Source

Re-exports from Data.Binary.Bit

#intToBit Source

#charToBit Source

#bitToInt Source

#bitToChar Source

Re-exports from Data.Binary.Bits

#Bits Source

newtype Bits

Constructors

Instances

#zeroes Source

#unsafeBitsToInt Source

#uncons Source

uncons :: Bits -> { head :: Bit, tail :: Bits }

#toString Source

#take Source

take :: Int -> Bits -> Bits

#tail Source

tail :: Bits -> Bits

#subtractBits Source

#setMsb Source

setMsb :: Bit -> Bits -> Bits

#setLsb Source

setLsb :: Bit -> Bits -> Bits

#ones Source

ones :: Int -> Bits

#length Source

#last Source

last :: Bits -> Bit

#intToBits Source

#init Source

init :: Bits -> Bits

#head Source

head :: Bits -> Bit

#drop Source

drop :: Int -> Bits -> Bits

#align Source

align :: Bits -> Bits -> Tuple Bits Bits

align length by adding zeroes from the left

#addBits' Source

addBits' :: Bit -> Bits -> Bits -> Bits

#addBits Source

#addBit Source

Re-exports from Data.Binary.Overflow

#Overflow Source

data Overflow a

Constructors

Instances

#overflowBit Source

overflowBit :: forall a. Overflow a -> Bit

#makeOverflow Source

makeOverflow :: forall a. Bit -> a -> Overflow a

#discardOverflow Source

discardOverflow :: forall a. Overflow a -> a