binary-ext-2.0.3: An alternate with strong-typed errors for `Data.Binary.Get` monad from `binary` package.

Safe HaskellNone
LanguageHaskell2010

Data.Conduit.Parsers

Synopsis

Documentation

choice :: Alternative f => [f a] -> f a #

choice ps tries to apply the actions in the list ps in order, until one of them succeeds. Returns the value of the succeeding action.

count :: Monad m => Int -> m a -> m [a] #

Apply the given action repeatedly, returning every result.

option'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e' m_e') => m_e a -> m_e' (Maybe a) Source #

many'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e' m_e') => m_e a -> m_e' [a] Source #

many1'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e m_e) => m_e a -> m_e (NonEmpty a) Source #

manyTill'' :: (MonadPlus m_Unit, MonadMapError e' m_e' () m_Unit, MonadMapError () m_Unit e m_e) => m_e a -> m_e' b -> m_e [a] Source #

sepBy'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e'' m_e'', MonadMapError e' m_e' () m_Unit, MonadMapError () m_Unit () m_Unit) => m_e a -> m_e' s -> m_e'' [a] Source #

sepBy1'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e m_e, MonadMapError e' m_e' () m_Unit, MonadMapError () m_Unit () m_Unit) => m_e a -> m_e' s -> m_e (NonEmpty a) Source #

skipMany'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e' m_e') => m_e a -> m_e' () Source #

skipMany1'' :: (MonadPlus m_Unit, MonadMapError e m_e () m_Unit, MonadMapError () m_Unit e m_e) => m_e a -> m_e () Source #

eitherP :: Alternative f => f a -> f b -> f (Either a b) #

Combine two alternatives.

class MonoFoldable c => Chunk c where Source #

Minimal complete definition

osplitAt

Methods

osplitAt :: Int -> c -> (c, c) Source #

Instances
Chunk ByteString Source # 
Instance details

Defined in Data.Conduit.Parsers

Chunk Text Source # 
Instance details

Defined in Data.Conduit.Parsers

Methods

osplitAt :: Int -> Text -> (Text, Text) Source #

elemsRead :: (DecodingState s, DecodingElemsRead s, Monad m) => GetT s i o e m Word64 Source #

Get the total number of bytes read to this point.

skip :: (DecodingState s, Chunk (DecodingToken s), Monad m) => Word64 -> GetT s (DecodingToken s) o () m () Source #

Skip ahead n bytes. Fails if fewer than n bytes are available.

isolate Source #

Arguments

:: (DecodingState s, Chunk (DecodingToken s), DecodingElemsRead s, Monad m) 
=> Word64

The number of bytes that must be consumed.

-> GetT s (DecodingToken s) o e m a

The decoder to isolate.

-> GetT s (DecodingToken s) o (Either (Maybe Word64) e) m a 

Isolate a decoder to operate with a fixed number of bytes, and fail if fewer bytes were consumed, or if fewer bytes are left in the input. Unlike isolate from binary package, offset from bytesRead will NOT be relative to the start of isolate.

matchP :: (DecodingState s, Monoid (DecodingToken s), Monad m) => GetT s (DecodingToken s) o e m a -> GetT s (DecodingToken s) o e m (DecodingToken s, a) Source #

tryP :: Monad m => GetT s i o e m a -> GetT s i o e m a Source #

Leftover consumed input on error.