@@ -467,7 +467,7 @@ instance Exception ToEventRawException
468decode :: MonadResource m => B.ByteString
468decode :: MonadResource m => B.ByteString
469#if MIN_VERSION_conduit(1, 0, 0)
469#if MIN_VERSION_conduit(1, 0, 0)
470− -> MonadSource m Event
470+ -> Producer m Event
472 -> GSource m Event
472 -> GSource m Event
@@ -496,7 +496,7 @@ decode bs =
497decodeFile :: MonadResource m => FilePath
497decodeFile :: MonadResource m => FilePath
498#if MIN_VERSION_conduit(1, 0, 0)
498#if MIN_VERSION_conduit(1, 0, 0)
499− -> MonadSource m Event
499+ -> Producer m Event
501 -> GSource m Event
501 -> GSource m Event
@@ -532,22 +532,14 @@ decodeFile file =
533runParser :: MonadResource m => Parser
533runParser :: MonadResource m => Parser
534#if MIN_VERSION_conduit(1, 0, 0)
534#if MIN_VERSION_conduit(1, 0, 0)
535− -> MonadSource m Event
535+ -> Producer m Event
537 -> GSource m Event
537 -> GSource m Event
539runParser parser = do
539runParser parser = do
540−#if MIN_VERSION_conduit(1, 0, 0)
541− e <- liftStreamIO $ parserParseOne' parser
543 e <- liftIO $ parserParseOne' parser
540 e <- liftIO $ parserParseOne' parser
545 case e of
541 case e of
546−#if MIN_VERSION_conduit(1, 0, 0)
547− Left err -> liftStreamIO $ throwIO err
549 Left err -> liftIO $ throwIO err
542 Left err -> liftIO $ throwIO err
551 Right Nothing -> return ()
543 Right Nothing -> return ()
552 Right (Just ev) -> yield ev >> runParser parser
544 Right (Just ev) -> yield ev >> runParser parser
@@ -569,7 +561,7 @@ parserParseOne' parser = allocaBytes eventSize $ \er -> do
570encode :: MonadResource m
562encode :: MonadResource m
571#if MIN_VERSION_conduit(1, 0, 0)
563#if MIN_VERSION_conduit(1, 0, 0)
572− => MonadSink Event m ByteString
564+ => Consumer Event m ByteString
574 => GSink Event m ByteString
566 => GSink Event m ByteString
@@ -590,7 +582,7 @@ encode =
590encodeFile :: MonadResource m
582encodeFile :: MonadResource m
591 => FilePath
583 => FilePath
592#if MIN_VERSION_conduit(1, 0, 0)
584#if MIN_VERSION_conduit(1, 0, 0)
593− -> MonadSink Event m ()
585+ -> Consumer Event m ()
595 -> GInfSink Event m
587 -> GInfSink Event m
@@ -611,7 +603,7 @@ runEmitter :: MonadResource m
611 => (Emitter -> IO a) -- ^ alloc
603 => (Emitter -> IO a) -- ^ alloc
612#if MIN_VERSION_conduit(1, 0, 0)
604#if MIN_VERSION_conduit(1, 0, 0)
613 -> (() -> a -> IO b) -- ^ close
605 -> (() -> a -> IO b) -- ^ close
614− -> MonadSink Event m b
606+ -> Consumer Event m b
616 -> (u -> a -> IO b) -- ^ close
608 -> (u -> a -> IO b) -- ^ close
617 -> Pipe l Event o u m b
609 -> Pipe l Event o u m b
@@ -638,17 +630,10 @@ runEmitter allocI closeI =
638 loop = awaitE >>= either close push
630 loop = awaitE >>= either close push
641−#if MIN_VERSION_conduit(1, 0, 0)
643− _ <- liftStreamIO $ toEventRaw e $ c_yaml_emitter_emit emitter
645− close u = liftStreamIO $ closeI u a
647 push e = do
633 push e = do
648 _ <- liftIO $ toEventRaw e $ c_yaml_emitter_emit emitter
634 _ <- liftIO $ toEventRaw e $ c_yaml_emitter_emit emitter
650 close u = liftIO $ closeI u a
636 close u = liftIO $ closeI u a
653-- | The pointer position
638-- | The pointer position
654data YamlMark = YamlMark { yamlIndex :: Int, yamlLine :: Int, yamlColumn :: Int }
639data YamlMark = YamlMark { yamlIndex :: Int, yamlLine :: Int, yamlColumn :: Int }