on master help sign in
Add takeStartBy_ parser
commit45e34b0a529e600948b97296cd0946e3d10434e1 authorHarendra Kumar <harendra@composewell.com> dateMon 9 May 2022, 13:06 (4 years ago) parent9e034c7
1 file changed+5−3
core/src/Streamly/Internal/Data/Parser.hs+5−3
core/src/Streamly/Internal/Data/Parser.hs+5−3
@@ -113,7 +113,7 @@ module Streamly.Internal.Data.Parser
113113 , takeEndByEsc
114114 -- , takeEndByEsc_
115115 , takeStartBy
116− -- , takeStartBy_
116+ , takeStartBy_
117117 , takeEitherSepBy
118118 , wordBy
119119 -- , wordByEsc
@@ -742,11 +742,13 @@ takeEitherSepBy _cond = undefined -- D.toParserK . D.takeEitherSepBy cond
742742takeStartBy :: MonadCatch m => (a -> Bool) -> Fold m a b -> Parser m a b
743743takeStartBy cond = D.toParserK . D.takeStartBy cond
744744
745−{-
745+-- | Like 'takeStartBy' but drops the separator.
746+--
747+-- >>> takeStartBy_ isBegin = Parser.takeFramedByGeneric Nothing (Just isBegin) Nothing
748+--
746749{-# INLINE takeStartBy_ #-}
747750takeStartBy_ :: MonadCatch m => (a -> Bool) -> Fold m a b -> Parser m a b
748751takeStartBy_ isBegin = takeFramedByGeneric Nothing (Just isBegin) Nothing
749−-}
750752
751753-------------------------------------------------------------------------------
752754-- Quoting and Escaping