-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Parsing framework based on conduit. -- -- Please refer to README. @package conduit-parse @version 0.2.1.0 -- | This module introduces ConduitParser, a wrapper around -- Sink that behaves like a parser. -- -- You probably want to import the Text.Parser.Combinators module -- together with this module. module Data.Conduit.Parser -- | Core type of the package. This is basically a Sink with a -- parsing state. data ConduitParser i m a -- | Run a ConduitParser. Any parsing failure will be thrown as an -- exception. runConduitParser :: (MonadThrow m) => ConduitParser i m a -> ConduitT i Void m a -- | Flipped version of (<?>). named :: (Monad m) => Text -> ConduitParser i m a -> ConduitParser i m a -- | await wrapped as a ConduitParser. -- -- If no data is available, UnexpectedEndOfInput is thrown. await :: (Monad m) => ConduitParser i m i -- | leftover wrapped as a ConduitParser. leftover :: i -> ConduitParser i m () -- | Return the ordered list of names (assigned through (<?>)) -- for the current parser stack. First element is the most nested parser. getParserNames :: ConduitParser i m [Text] -- | Return the name (assigned through (<?>)) of the current -- parser (most nested), or mempty if it has none. getParserName :: ConduitParser i m Text -- | peek wrapped as a ConduitParser. peek :: (Monad m) => ConduitParser i m (Maybe i) data ConduitParserException BothFailed :: ConduitParserException -> ConduitParserException -> ConduitParserException ExpectedEndOfInput :: ConduitParserException NamedParserException :: Text -> ConduitParserException -> ConduitParserException UnexpectedEndOfInput :: ConduitParserException UnexpectedFollowedBy :: Text -> ConduitParserException Unexpected :: Text -> ConduitParserException