encoding-0.10.2: A library for various character encodings

Safe Haskell | None
Language | Haskell2010

Data.Encoding.ByteSink

Contents

- Orphan instances

# Documentation

class (Monad m, Throws EncodingException m) => ByteSink (m :: Type -> Type) where Source #

Minimal complete definition

pushWord8

Methods

pushWord8 :: Word8 -> m () Source #

pushWord16be :: Word16 -> m () Source #

pushWord16le :: Word16 -> m () Source #

pushWord32be :: Word32 -> m () Source #

pushWord32le :: Word32 -> m () Source #

pushWord64be :: Word64 -> m () Source #

pushWord64le :: Word64 -> m () Source #

#### Instances

Instances details

ByteSink PutM Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pushWord8 :: Word8 -> PutM () Source # pushWord16be :: Word16 -> PutM () Source # pushWord16le :: Word16 -> PutM () Source # pushWord32be :: Word32 -> PutM () Source # pushWord32le :: Word32 -> PutM () Source # pushWord64be :: Word64 -> PutM () Source # pushWord64le :: Word64 -> PutM () Source #
ByteSink PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pushWord8 :: Word8 -> PutME () Source # pushWord16be :: Word16 -> PutME () Source # pushWord16le :: Word16 -> PutME () Source # pushWord32be :: Word32 -> PutME () Source # pushWord32le :: Word32 -> PutME () Source # pushWord64be :: Word64 -> PutME () Source # pushWord64le :: Word64 -> PutME () Source #
ByteSink StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pushWord8 :: Word8 -> StrictSink () Source # pushWord16be :: Word16 -> StrictSink () Source # pushWord16le :: Word16 -> StrictSink () Source # pushWord32be :: Word32 -> StrictSink () Source # pushWord32le :: Word32 -> StrictSink () Source # pushWord64be :: Word64 -> StrictSink () Source # pushWord64le :: Word64 -> StrictSink () Source #
ByteSink StrictSinkE Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> StrictSinkE () Source #

pushWord16be :: Word16 -> StrictSinkE () Source #

pushWord16le :: Word16 -> StrictSinkE () Source #

pushWord32be :: Word32 -> StrictSinkE () Source #

pushWord32le :: Word32 -> StrictSinkE () Source #

pushWord64be :: Word64 -> StrictSinkE () Source #

pushWord64le :: Word64 -> StrictSinkE () Source #

ByteSink StrictSinkExplicit Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> StrictSinkExplicit () Source #

pushWord16be :: Word16 -> StrictSinkExplicit () Source #

pushWord16le :: Word16 -> StrictSinkExplicit () Source #

pushWord32be :: Word32 -> StrictSinkExplicit () Source #

pushWord32le :: Word32 -> StrictSinkExplicit () Source #

pushWord64be :: Word64 -> StrictSinkExplicit () Source #

pushWord64le :: Word64 -> StrictSinkExplicit () Source #

ByteSink (ReaderT Handle IO) Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> ReaderT Handle IO () Source #

pushWord16be :: Word16 -> ReaderT Handle IO () Source #

pushWord16le :: Word16 -> ReaderT Handle IO () Source #

pushWord32be :: Word32 -> ReaderT Handle IO () Source #

pushWord32le :: Word32 -> ReaderT Handle IO () Source #

pushWord64be :: Word64 -> ReaderT Handle IO () Source #

pushWord64le :: Word64 -> ReaderT Handle IO () Source #

(Monad m, Throws EncodingException m) => ByteSink (StateT (Seq Char) m) Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> StateT (Seq Char) m () Source #

pushWord16be :: Word16 -> StateT (Seq Char) m () Source #

pushWord16le :: Word16 -> StateT (Seq Char) m () Source #

pushWord32be :: Word32 -> StateT (Seq Char) m () Source #

pushWord32le :: Word32 -> StateT (Seq Char) m () Source #

pushWord64be :: Word64 -> StateT (Seq Char) m () Source #

pushWord64le :: Word64 -> StateT (Seq Char) m () Source #

newtype PutME a Source #

Constructors

PutME (Either EncodingException (PutM (), a)) |

#### Instances

Instances details

ByteSink PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pushWord8 :: Word8 -> PutME () Source # pushWord16be :: Word16 -> PutME () Source # pushWord16le :: Word16 -> PutME () Source # pushWord32be :: Word32 -> PutME () Source # pushWord32le :: Word32 -> PutME () Source # pushWord64be :: Word64 -> PutME () Source # pushWord64le :: Word64 -> PutME () Source #
Applicative PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pure :: a -> PutME a Source # (<*>) :: PutME (a -> b) -> PutME a -> PutME b Source # liftA2 :: (a -> b -> c) -> PutME a -> PutME b -> PutME c Source # (*>) :: PutME a -> PutME b -> PutME b Source # (<*) :: PutME a -> PutME b -> PutME a Source #
Functor PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods fmap :: (a -> b) -> PutME a -> PutME b Source # (<$) :: a -> PutME b -> PutME a Source #
Monad PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods (>>=) :: PutME a -> (a -> PutME b) -> PutME b Source # (>>) :: PutME a -> PutME b -> PutME b Source # return :: a -> PutME a Source #
Throws EncodingException PutME Source # |
Instance details Defined in Data.Encoding.ByteSink Methods throwException :: EncodingException -> PutME a Source #

newtype StrictSink a Source #

Constructors

StrictS (Ptr Word8 -> Int -> Int -> IO (a, Ptr Word8, Int, Int)) |

#### Instances

Instances details

ByteSink StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pushWord8 :: Word8 -> StrictSink () Source # pushWord16be :: Word16 -> StrictSink () Source # pushWord16le :: Word16 -> StrictSink () Source # pushWord32be :: Word32 -> StrictSink () Source # pushWord32le :: Word32 -> StrictSink () Source # pushWord64be :: Word64 -> StrictSink () Source # pushWord64le :: Word64 -> StrictSink () Source #
Applicative StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pure :: a -> StrictSink a Source # (<*>) :: StrictSink (a -> b) -> StrictSink a -> StrictSink b Source # liftA2 :: (a -> b -> c) -> StrictSink a -> StrictSink b -> StrictSink c Source # (*>) :: StrictSink a -> StrictSink b -> StrictSink b Source # (<*) :: StrictSink a -> StrictSink b -> StrictSink a Source #
Functor StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods fmap :: (a -> b) -> StrictSink a -> StrictSink b Source # (<$) :: a -> StrictSink b -> StrictSink a Source #
Monad StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods (>>=) :: StrictSink a -> (a -> StrictSink b) -> StrictSink b Source # (>>) :: StrictSink a -> StrictSink b -> StrictSink b Source # return :: a -> StrictSink a Source #
Throws EncodingException StrictSink Source # |
Instance details Defined in Data.Encoding.ByteSink Methods throwException :: EncodingException -> StrictSink a Source #

newtype StrictSinkE a Source #

Constructors

StrictSinkE (StrictSink (Either EncodingException a)) |

#### Instances

Instances details

ByteSink StrictSinkE Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> StrictSinkE () Source #

pushWord16be :: Word16 -> StrictSinkE () Source #

pushWord16le :: Word16 -> StrictSinkE () Source #

pushWord32be :: Word32 -> StrictSinkE () Source #

pushWord32le :: Word32 -> StrictSinkE () Source #

pushWord64be :: Word64 -> StrictSinkE () Source #

pushWord64le :: Word64 -> StrictSinkE () Source #

Applicative StrictSinkE Source # |
Instance details Defined in Data.Encoding.ByteSink Methods pure :: a -> StrictSinkE a Source # (<*>) :: StrictSinkE (a -> b) -> StrictSinkE a -> StrictSinkE b Source # liftA2 :: (a -> b -> c) -> StrictSinkE a -> StrictSinkE b -> StrictSinkE c Source # (*>) :: StrictSinkE a -> StrictSinkE b -> StrictSinkE b Source # (<*) :: StrictSinkE a -> StrictSinkE b -> StrictSinkE a Source #
Functor StrictSinkE Source # |
Instance details Defined in Data.Encoding.ByteSink Methods fmap :: (a -> b) -> StrictSinkE a -> StrictSinkE b Source # (<$) :: a -> StrictSinkE b -> StrictSinkE a Source #
Monad StrictSinkE Source # |
Instance details Defined in Data.Encoding.ByteSink Methods (>>=) :: StrictSinkE a -> (a -> StrictSinkE b) -> StrictSinkE b Source # (>>) :: StrictSinkE a -> StrictSinkE b -> StrictSinkE b Source # return :: a -> StrictSinkE a Source #
Throws EncodingException StrictSinkE Source # |
Instance details Defined in Data.Encoding.ByteSink Methods throwException :: EncodingException -> StrictSinkE a Source #

createStrictWithLen :: StrictSink a -> Int -> (a, ByteString) Source #

createStrict :: StrictSink a -> (a, ByteString) Source #

newtype StrictSinkExplicit a Source #

Constructors

StrictSinkExplicit (StrictSink (Either EncodingException a)) |

#### Instances

Instances details

ByteSink StrictSinkExplicit Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pushWord8 :: Word8 -> StrictSinkExplicit () Source #

pushWord16be :: Word16 -> StrictSinkExplicit () Source #

pushWord16le :: Word16 -> StrictSinkExplicit () Source #

pushWord32be :: Word32 -> StrictSinkExplicit () Source #

pushWord32le :: Word32 -> StrictSinkExplicit () Source #

pushWord64be :: Word64 -> StrictSinkExplicit () Source #

pushWord64le :: Word64 -> StrictSinkExplicit () Source #

Applicative StrictSinkExplicit Source # |

Instance details

Defined in Data.Encoding.ByteSink

Methods

pure :: a -> StrictSinkExplicit a Source #

(<*>) :: StrictSinkExplicit (a -> b) -> StrictSinkExplicit a -> StrictSinkExplicit b Source #

liftA2 :: (a -> b -> c) -> StrictSinkExplicit a -> StrictSinkExplicit b -> StrictSinkExplicit c Source #

(*>) :: StrictSinkExplicit a -> StrictSinkExplicit b -> StrictSinkExplicit b Source #

(<*) :: StrictSinkExplicit a -> StrictSinkExplicit b -> StrictSinkExplicit a Source #

Functor StrictSinkExplicit Source # |
Instance details Defined in Data.Encoding.ByteSink Methods fmap :: (a -> b) -> StrictSinkExplicit a -> StrictSinkExplicit b Source # (<$) :: a -> StrictSinkExplicit b -> StrictSinkExplicit a Source #
Monad StrictSinkExplicit Source # |
Instance details Defined in Data.Encoding.ByteSink Methods (>>=) :: StrictSinkExplicit a -> (a -> StrictSinkExplicit b) -> StrictSinkExplicit b Source # (>>) :: StrictSinkExplicit a -> StrictSinkExplicit b -> StrictSinkExplicit b Source # return :: a -> StrictSinkExplicit a Source #
Throws EncodingException StrictSinkExplicit Source # |
Instance details Defined in Data.Encoding.ByteSink Methods throwException :: EncodingException -> StrictSinkExplicit a Source #

# Orphan instances

Throws EncodingException PutM Source # |
Instance details Methods throwException :: EncodingException -> PutM a Source #