aboutsummaryrefslogtreecommitdiffhomepage
path: root/Pipes
diff options
context:
space:
mode:
authormichaelt <what_is_it_to_do_anything@yahoo.com>2014-01-30 10:50:14 -0500
committermichaelt <what_is_it_to_do_anything@yahoo.com>2014-01-30 10:50:14 -0500
commit7fc48f7c218d0d4109e3367c72aa7f7d3ac5ea83 (patch)
treef134d4acc3b468bda9424df5c787ee4b8d01fc15 /Pipes
parent7ed76745611d379a43b5bed19b136c44df671e04 (diff)
downloadtext-pipes-7fc48f7c218d0d4109e3367c72aa7f7d3ac5ea83.tar.gz
text-pipes-7fc48f7c218d0d4109e3367c72aa7f7d3ac5ea83.tar.zst
text-pipes-7fc48f7c218d0d4109e3367c72aa7f7d3ac5ea83.zip
pipes-group does not export transFreeT, use maps like pipes-bytestring
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