diff options
Diffstat (limited to 'Pipes')
-rw-r--r-- | Pipes/Text.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Pipes/Text.hs b/Pipes/Text.hs index cc08256..f2b4aac 100644 --- a/Pipes/Text.hs +++ b/Pipes/Text.hs | |||
@@ -781,12 +781,11 @@ lines p0 = PP.FreeT (go0 p0) | |||
781 | else return $ PP.Free $ go1 (yield txt >> p') | 781 | else return $ PP.Free $ go1 (yield txt >> p') |
782 | go1 p = do | 782 | go1 p = do |
783 | p' <- break ('\n' ==) p | 783 | p' <- break ('\n' ==) p |
784 | return $ PP.FreeT (go2 p') | 784 | return $ PP.FreeT $ do |
785 | go2 p = do | 785 | x <- nextChar p' |
786 | x <- nextChar p | 786 | case x of |
787 | return $ case x of | 787 | Left r -> return $ PP.Pure r |
788 | Left r -> PP.Pure r | 788 | Right (_, p'') -> go0 p'' |
789 | Right (_, p') -> PP.Free (go1 p') | ||
790 | {-# INLINABLE lines #-} | 789 | {-# INLINABLE lines #-} |
791 | 790 | ||
792 | 791 | ||