Hoogle Search
Within LTS Haskell 24.57 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
streamly Streamly.Internal.Data.Stream.IsStream Apply a Parser repeatedly on a stream and emit the parsed values in the output stream. This is the streaming equivalent of the many parse combinator.
>>> Stream.toList $ Stream.parseMany (Parser.takeBetween 0 2 Fold.sum) $ Stream.fromList [1..10] [Right 3,Right 7,Right 11,Right 15,Right 19]
> Stream.toList $ Stream.parseMany (Parser.line Fold.toList) $ Stream.fromList "hello\nworld" ["hello\n","world"]
foldMany f = parseMany (fromFold f)
Known Issues: When the parser fails there is no way to get the remaining stream. Pre-release -
streamly Streamly.Internal.Data.Stream.IsStream Same as parseMany but for StreamD streams. Internal
parseManyTill :: forall a (m :: Type -> Type) b x t . Parser a m b -> Parser a m x -> t m a -> t m bstreamly Streamly.Internal.Data.Stream.IsStream parseManyTill collect test stream tries the parser test on the input, if test fails it backtracks and tries collect, after collect succeeds test is tried again and so on. The parser stops when test succeeds. The output of test is discarded and the output of collect is emitted in the output stream. The parser fails if collect fails. Unimplemented
refoldMany :: (IsStream t, Monad m) => Refold m c a b -> m c -> t m a -> t m bstreamly Streamly.Internal.Data.Stream.IsStream Like foldMany but using the Refold type instead of Fold. Pre-release
scanMany :: forall t (m :: Type -> Type) a b . (IsStream t, Monad m) => Fold m a b -> t m a -> t m bstreamly Streamly.Internal.Data.Stream.IsStream Like scan but restarts scanning afresh when the scanning fold terminates. Pre-release
splitOnAny :: forall a (m :: Type -> Type) b t . [Array a] -> Fold m a b -> t m a -> t m bstreamly Streamly.Internal.Data.Stream.IsStream Split on any one of the given patterns. Unimplemented
splitOnSuffixSeqAny :: forall a (m :: Type -> Type) b t . [Array a] -> Fold m a b -> t m a -> t m bstreamly Streamly.Internal.Data.Stream.IsStream Split post any one of the given patterns. Unimplemented
-
streamly Streamly.Internal.Data.Stream.IsStream Like concatMap but uses an Unfold for stream generation. Unlike concatMap this can fuse the Unfold code with the inner loop and therefore provide many times better performance.
-
streamly Streamly.Internal.Data.Stream.IsStream Like unfoldMany but interleaves the streams in the same way as interleave behaves instead of appending them. Pre-release
-
streamly Streamly.Internal.Data.Stream.IsStream Like unfoldMany but executes the streams in the same way as roundrobin. Pre-release