[Haskell-cafe] How to write Source for TChan working with LC.take?
Hiromi ISHII
konn.jinro at gmail.com
Sun May 20 15:22:48 CEST 2012
Oops, sorry.
The last case's behaviour was not as I expected... A correct log is below:
~~~~
ghci> sourceTChanRaw ch $$ LC.isolate 10 =$= LC.mapM_ print
()
()
()
()
()
()
()
()
()
()
ghci> sourceTChanState ch $$ LC.isolate 10 =$= LC.mapM_ print
()
()
()
()
()
()
()
()
()
()
ghci> sourceTChanYield ch $$ LC.isolate 10 =$= LC.mapM_ print
()
()
()
()
()
()
()
()
()
()
*blocks*
~~~~
So again, sourceTChanYield blocks here even if it is already supplied with enough values!
-- Hiromi ISHII
konn.jinro at gmail.com
More information about the Haskell-Cafe
mailing list