Ticket #4218: TestRandomIO.hs

File TestRandomIO.hs, 265 bytes (added by EyalLotem, 9 years ago)
Line 
1module TestRandomIO where
2
3import Control.Monad
4import Control.Exception
5import System.Random
6
7blows = do
8  rs <- replicateM 1000000 randomIO :: IO [Int]
9  print $ last rs
10
11works = do
12  rs <- replicateM 1000000 (evaluate =<< randomIO) :: IO [Int]
13  print $ last rs