From 7fc48f7c218d0d4109e3367c72aa7f7d3ac5ea83 Mon Sep 17 00:00:00 2001 From: michaelt Date: Thu, 30 Jan 2014 10:50:14 -0500 Subject: pipes-group does not export transFreeT, use maps like pipes-bytestring --- Pipes/Text.hs | 10 ++++------ 1 file 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 import qualified Pipes.Text.Internal as PE import Pipes.Text.Internal (Codec(..)) import Pipes.Core (respond, Server') -import Pipes.Group (concats, intercalates, transFreeT, FreeT(..), FreeF(..)) +import Pipes.Group (concats, intercalates, FreeT(..), FreeF(..)) import qualified Pipes.Group as PG import qualified Pipes.Parse as PP import Pipes.Parse (Parser) @@ -988,11 +988,9 @@ lines = Data.Profunctor.dimap _lines (fmap _unlines) -- _unlines -- :: Monad m -- => FreeT (Producer Text m) m x -> Producer Text m x - _unlines = concats . transFreeT addNewline + _unlines = concats . PG.maps (<* yield (T.singleton '\n')) + - -- addNewline - -- :: Monad m => Producer Text m r -> Producer Text m r - addNewline p = p <* yield (T.singleton '\n') {-# INLINABLE lines #-} @@ -1061,7 +1059,7 @@ unlines = go -} unwords :: (Monad m) => FreeT (Producer Text m) m r -> Producer Text m r -unwords = intercalate (yield $ T.pack " ") +unwords = intercalate (yield $ T.singleton ' ') {-# INLINABLE unwords #-} {- $parse -- cgit v1.2.3