Skip to content

Commit 6851742

Browse files
authored
Merge pull request #69 from haskell-streaming/remove-references-to-resourcet
[resolves #56]; remove references to ResourceT in documentation
2 parents cf4ae24 + 9c34fc2 commit 6851742

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Streaming/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ separate odd_even
10401040
10411041
Or we can write them to separate files or whatever:
10421042
1043-
>>> runResourceT $ S.writeFile "even.txt" . S.show $ S.writeFile "odd.txt" . S.show $ S.separate odd_even
1043+
>>> S.writeFile "even.txt" . S.show $ S.writeFile "odd.txt" . S.show $ S.separate odd_even
10441044
>>> :! cat even.txt
10451045
2
10461046
4

src/Streaming/Prelude.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ subst f s = loop s where
19731973
>>> S.toList $ S.take 3 $ each "with"
19741974
"wit" :> ()
19751975
1976-
>>> runResourceT $ S.stdoutLn $ S.take 3 $ S.readFile "stream.hs"
1976+
>>> S.stdoutLn $ S.take 3 $ S.readFile "stream.hs"
19771977
import Streaming
19781978
import qualified Streaming.Prelude as S
19791979
import Streaming.Prelude (each, next, yield)
@@ -2598,7 +2598,7 @@ sumToCompose x = case x of
25982598
like 'MonadResource'. Thus I can independently filter and write to one file, but
25992599
nub and write to another, or interact with a database and a logfile and the like:
26002600
2601-
>>> runResourceT $ (S.writeFile "hello2.txt" . S.nubOrd) $ store (S.writeFile "hello.txt" . S.filter (/= "world")) $ each ["hello", "world", "goodbye", "world"]
2601+
>>> (S.writeFile "hello2.txt" . S.nubOrd) $ store (S.writeFile "hello.txt" . S.filter (/= "world")) $ each ["hello", "world", "goodbye", "world"]
26022602
>>> :! cat hello.txt
26032603
hello
26042604
goodbye

0 commit comments

Comments
 (0)