on master help sign in
Use ParserD in ParserD.Type docspec
9af539cRanjeet Kumar Ranjan
core/src/Streamly/Internal/Data/Parser/ParserD/Type.hs+3−2
@@ -1294,8 +1294,9 @@ dieM err = Parser undefined (IError <$> err) undefined
1294-- Note: The implementation of '<|>' is not lazy in the second
1294-- Note: The implementation of '<|>' is not lazy in the second
1295-- argument. The following code will fail:
1295-- argument. The following code will fail:
1296--
1296--
1297−-- >>> Stream.parse (Parser.satisfy (> 0) <|> undefined) $ Stream.fromList [1..10]
1297+-- >>> Stream.parse (ParserD.toParserK $ ParserD.satisfy (> 0) <|> undefined) $ Stream.fromList [1..10]
1298−-- Right 1
1298+-- *** Exception: Prelude.undefined
1299+-- ...
1299--
1300--
1300instance Monad m => Alternative (Parser a m) where
1301instance Monad m => Alternative (Parser a m) where
1301 {-# INLINE empty #-}
1302 {-# INLINE empty #-}