ocharles/pipes-random — pull request #1 by michaelt (2013-08-28 03:18:36+00:00)
Title: mechanical update

This just fits things with the more recent 4.0. It seemed fine with the following dimwitted tests, `digits` and `nonsense`:

import Pipes
import qualified Pipes.Prelude as P
import Pipes.Random
import qualified System.Random as R

rand :: Producer Int IO ()
rand = do g <- lift (R.getStdGen)
random g
randR :: Int -> Int -> Producer Int IO ()
randR n m = do g <- lift (R.getStdGen)
randomR (n,m) g

consumer = P.take 100 >-> P.map show >-> P.stdout

digits = run $ randR 0 9 >-> consumer
nonsense = run $ rand >-> consumer