module Streamly.Data.ParserK
(
ParserK
, fromFold
, fromParser
, fromPure
, fromEffect
, die
)
where
import Control.Monad.IO.Class (MonadIO)
import Streamly.Internal.Data.Fold (Fold)
import Streamly.Internal.Data.Unboxed (Unbox)
import qualified Streamly.Internal.Data.Parser.ParserD as ParserD
import Streamly.Internal.Data.Parser.ParserK.Type
{-# INLINE fromFold #-}
fromFold :: (MonadIO m, Unbox a) => Fold m a b -> ParserK a m b
fromFold :: Fold m a b -> ParserK a m b
fromFold = Parser a m b -> ParserK a m b
forall (m :: * -> *) a b.
(Monad m, Unbox a) =>
Parser a m b -> ParserK a m b
fromParser (Parser a m b -> ParserK a m b)
-> (Fold m a b -> Parser a m b) -> Fold m a b -> ParserK a m b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Fold m a b -> Parser a m b
forall (m :: * -> *) a b. Monad m => Fold m a b -> Parser a m b
ParserD.fromFold