caerbannog-1.0.0.2: That rabbit's got a vicious streak a mile wide!
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Binary.Bits.Put

Description

Put bits easily.

Synopsis

Documentation

data BitPut a Source #

Instances

Instances details
Applicative BitPut Source # 
Instance details

Defined in Data.Binary.Bits.Put

Methods

pure :: a -> BitPut a #

(<*>) :: BitPut (a -> b) -> BitPut a -> BitPut b #

liftA2 :: (a -> b -> c) -> BitPut a -> BitPut b -> BitPut c #

(*>) :: BitPut a -> BitPut b -> BitPut b #

(<*) :: BitPut a -> BitPut b -> BitPut a #

Functor BitPut Source # 
Instance details

Defined in Data.Binary.Bits.Put

Methods

fmap :: (a -> b) -> BitPut a -> BitPut b #

(<$) :: a -> BitPut b -> BitPut a #

Monad BitPut Source # 
Instance details

Defined in Data.Binary.Bits.Put

Methods

(>>=) :: BitPut a -> (a -> BitPut b) -> BitPut b #

(>>) :: BitPut a -> BitPut b -> BitPut b #

return :: a -> BitPut a #

runBitPut :: BitPut () -> Put Source #

Run the BitPut monad inside Put.

joinPut :: Put -> BitPut () Source #

Run a Put inside BitPut. Any partially written bytes will be flushed before Put executes to ensure byte alignment.

Data types

Bool

putBool :: Bool -> BitPut () Source #

Put a 1 bit Bool.

Words

putWord8 :: Int -> Word8 -> BitPut () Source #

Put the n lower bits of a Word8.

putWord16be :: Int -> Word16 -> BitPut () Source #

Put the n lower bits of a Word16.

putWord32be :: Int -> Word32 -> BitPut () Source #

Put the n lower bits of a Word32.

putWord64be :: Int -> Word64 -> BitPut () Source #

Put the n lower bits of a Word64.

ByteString

putByteString :: ByteString -> BitPut () Source #

Put a ByteString.