Copyright | (c) Edward Kmett 2013 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell98 |
- newtype Coding m a = Coding {}
- getAligned :: MonadGet m => m a -> Coding m a
- getBit :: MonadGet m => Coding m Bool
- getBits :: (MonadGet m, Bits b) => Int -> Int -> b -> Coding m b
- getBitsFrom :: (MonadGet m, Bits b) => Int -> b -> Coding m b
- putAligned :: MonadPut m => m a -> Coding m a
- putUnaligned :: (MonadPut m, FiniteBits b) => b -> Coding m ()
- putBit :: MonadPut m => Bool -> Coding m ()
- putBits :: (MonadPut m, Bits b) => Int -> Int -> b -> Coding m ()
- putBitsFrom :: (MonadPut m, Bits b) => Int -> b -> Coding m ()
Documentation
MonadTrans Coding Source # | |
MonadReader e m => MonadReader e (Coding m) Source # | |
MonadState s m => MonadState s (Coding m) Source # | |
Monad m => Monad (Coding m) Source # | |
Functor (Coding m) Source # | |
Monad m => Applicative (Coding m) Source # | |
(Monad m, Alternative m) => Alternative (Coding m) Source # | |
MonadPlus m => MonadPlus (Coding m) Source # | |
MonadGet m => MonadGet (Coding m) Source # | |
MonadPut m => MonadPut (Coding m) Source # | |
type Bytes (Coding m) Source # | |
type Remaining (Coding m) Source # | |
Get
getAligned :: MonadGet m => m a -> Coding m a Source #
getBit :: MonadGet m => Coding m Bool Source #
Get
a single bit, consuming an entire byte
if the bit buffer is empty
Put
putAligned :: MonadPut m => m a -> Coding m a Source #
putUnaligned :: (MonadPut m, FiniteBits b) => b -> Coding m () Source #
Put
all the bits without a flush
putBit :: MonadPut m => Bool -> Coding m () Source #
Put
a single bit, emitting an entire byte
if the bit buffer is full