aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
Diffstat (limited to 'Pipes')
-rw-r--r--Pipes/Text.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Pipes/Text.hs b/Pipes/Text.hs
index 199e7c2..71b1316 100644
--- a/Pipes/Text.hs
+++ b/Pipes/Text.hs
@@ -183,7 +183,7 @@ import qualified Pipes.ByteString as PB
183import qualified Pipes.Text.Internal as PE 183import qualified Pipes.Text.Internal as PE
184import Pipes.Text.Internal (Codec(..)) 184import Pipes.Text.Internal (Codec(..))
185import Pipes.Core (respond, Server') 185import Pipes.Core (respond, Server')
186import Pipes.Group (concats, intercalates, transFreeT, FreeT(..), FreeF(..)) 186import Pipes.Group (concats, intercalates, FreeT(..), FreeF(..))
187import qualified Pipes.Group as PG 187import qualified Pipes.Group as PG
188import qualified Pipes.Parse as PP 188import qualified Pipes.Parse as PP
189import Pipes.Parse (Parser) 189import Pipes.Parse (Parser)
@@ -988,11 +988,9 @@ lines = Data.Profunctor.dimap _lines (fmap _unlines)
988 -- _unlines 988 -- _unlines
989 -- :: Monad m 989 -- :: Monad m
990 -- => FreeT (Producer Text m) m x -> Producer Text m x 990 -- => FreeT (Producer Text m) m x -> Producer Text m x
991 _unlines = concats . transFreeT addNewline 991 _unlines = concats . PG.maps (<* yield (T.singleton '\n'))
992
992 993
993 -- addNewline
994 -- :: Monad m => Producer Text m r -> Producer Text m r
995 addNewline p = p <* yield (T.singleton '\n')
996{-# INLINABLE lines #-} 994{-# INLINABLE lines #-}
997 995
998 996
@@ -1061,7 +1059,7 @@ unlines = go
1061-} 1059-}
1062unwords 1060unwords
1063 :: (Monad m) => FreeT (Producer Text m) m r -> Producer Text m r 1061 :: (Monad m) => FreeT (Producer Text m) m r -> Producer Text m r
1064unwords = intercalate (yield $ T.pack " ") 1062unwords = intercalate (yield $ T.singleton ' ')
1065{-# INLINABLE unwords #-} 1063{-# INLINABLE unwords #-}
1066 1064
1067{- $parse 1065{- $parse