From 3f76b550da195af30d32f611d55b33e0651cd0e8 Mon Sep 17 00:00:00 2001 From: michaelt Date: Sun, 16 Feb 2014 11:49:22 -0500 Subject: readme --- Pipes/Text/IO.hs | 6 +++--- README.md | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Pipes/Text/IO.hs b/Pipes/Text/IO.hs index 43e636e..92500c3 100644 --- a/Pipes/Text/IO.hs +++ b/Pipes/Text/IO.hs @@ -60,7 +60,7 @@ import Prelude hiding (readFile, writeFile) but uses the system encoding and has other nice @Data.Text.IO@ features -} -fromHandle :: MonadIO m => IO.Handle -> Producer' Text m () +fromHandle :: MonadIO m => IO.Handle -> Producer Text m () fromHandle h = go where go = do txt <- liftIO (T.hGetChunk h) if T.null txt then return () @@ -69,7 +69,7 @@ fromHandle h = go where {-# INLINABLE fromHandle#-} -- | Stream text from 'stdin' -stdin :: MonadIO m => Producer' Text m () +stdin :: MonadIO m => Producer Text m () stdin = fromHandle IO.stdin {-# INLINE stdin #-} @@ -80,7 +80,7 @@ stdin = fromHandle IO.stdin MAIN = PUTSTRLN "HELLO WORLD" -} -readFile :: MonadSafe m => FilePath -> Producer' Text m () +readFile :: MonadSafe m => FilePath -> Producer Text m () readFile file = Safe.withFile file IO.ReadMode fromHandle {-# INLINE readFile #-} diff --git a/README.md b/README.md index 3bb067e..ff2bf1e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ pipes-text ========== -This package follows the rule `pipes-text : pipes-bytestring :: text : bytestring` It has three modules, `Pipes.Text` , `Pipes.Text.Encoding` and `Pipes.Text.IO`; the division has more or less the significance it has in the `text` library. +This package follows the rule: + + `pipes-text : pipes-bytestring :: text : bytestring` + +It has three modules, `Pipes.Text` , `Pipes.Text.Encoding` and `Pipes.Text.IO`; the division has more or less the significance it has in the `text` library. Note that the module `Pipes.Text.IO` uses version 0.11.3 or later of the `text` library. (It thus works with the version of `text` that came with the 2013 Haskell Platform. To use an older `text`, install with the flag `-fnoio` \ No newline at end of file -- cgit v1.2.3