module Streamly.Internal.Unicode.Array.Prim.Pinned
(
lines
, words
, unlines
, unwords
)
where
import Control.Monad.IO.Class (MonadIO(..))
import Streamly.Prelude (MonadAsync)
import Prelude hiding (String, lines, words, unlines, unwords)
import Streamly.Internal.Data.Stream.IsStream (IsStream)
import Streamly.Internal.Data.Array.Prim.Pinned (Array)
import qualified Streamly.Internal.Unicode.Stream as S
import qualified Streamly.Internal.Data.Array.Prim.Pinned as A
{-# INLINE lines #-}
lines :: (MonadIO m, IsStream t) => t m Char -> t m (Array Char)
lines :: forall (m :: * -> *) (t :: (* -> *) -> * -> *).
(MonadIO m, IsStream t) =>
t m Char -> t m (Array Char)
lines = forall (m :: * -> *) (t :: (* -> *) -> * -> *) b.
(Monad m, IsStream t) =>
Fold m Char b -> t m Char -> t m b
S.lines forall (m :: * -> *) a. (MonadIO m, Prim a) => Fold m a (Array a)
A.write
{-# INLINE words #-}
words :: (MonadIO m, IsStream t) => t m Char -> t m (Array Char)
words :: forall (m :: * -> *) (t :: (* -> *) -> * -> *).
(MonadIO m, IsStream t) =>
t m Char -> t m (Array Char)
words = forall (m :: * -> *) (t :: (* -> *) -> * -> *) b.
(Monad m, IsStream t) =>
Fold m Char b -> t m Char -> t m b
S.words forall (m :: * -> *) a. (MonadIO m, Prim a) => Fold m a (Array a)
A.write
{-# INLINE unlines #-}
unlines :: (MonadAsync m, IsStream t) => t m (Array Char) -> t m Char
unlines :: forall (m :: * -> *) (t :: (* -> *) -> * -> *).
(MonadAsync m, IsStream t) =>
t m (Array Char) -> t m Char
unlines = forall (m :: * -> *) (t :: (* -> *) -> * -> *) a.
(MonadIO m, IsStream t) =>
Unfold m a Char -> t m a -> t m Char
S.unlines forall (m :: * -> *) a. (MonadIO m, Prim a) => Unfold m (Array a) a
A.read
{-# INLINE unwords #-}
unwords :: (MonadAsync m, IsStream t) => t m (Array Char) -> t m Char
unwords :: forall (m :: * -> *) (t :: (* -> *) -> * -> *).
(MonadAsync m, IsStream t) =>
t m (Array Char) -> t m Char
unwords = forall (m :: * -> *) (t :: (* -> *) -> * -> *) a.
(MonadIO m, IsStream t) =>
Unfold m a Char -> t m a -> t m Char
S.unwords forall (m :: * -> *) a. (MonadIO m, Prim a) => Unfold m (Array a) a
A.read