on master help sign in
Use ParserD in ParserD.Type docspec
commit9af539c24377e1c98fa4ea6e01ff853fd4e62593 authorRanjeet Kumar Ranjan <ranjeetr@composewell.com> dateWed 30 Nov 2022, 17:14 (4 years ago) parentadd9565
1 file changed+3−2
core/src/Streamly/Internal/Data/Parser/ParserD/Type.hs+3−2
core/src/Streamly/Internal/Data/Parser/ParserD/Type.hs+3−2
@@ -1294,8 +1294,9 @@ dieM err = Parser undefined (IError <$> err) undefined
12941294-- Note: The implementation of '<|>' is not lazy in the second
12951295-- argument. The following code will fail:
12961296--
1297−-- >>> Stream.parse (Parser.satisfy (> 0) <|> undefined) $ Stream.fromList [1..10]
1298−-- Right 1
1297+-- >>> Stream.parse (ParserD.toParserK $ ParserD.satisfy (> 0) <|> undefined) $ Stream.fromList [1..10]
1298+-- *** Exception: Prelude.undefined
1299+-- ...
12991300--
13001301instance Monad m => Alternative (Parser a m) where
13011302 {-# INLINE empty #-}