
9 Jan
2011
9 Jan
'11
7:51 p.m.
On 10 January 2011 10:44, z_axis
betterStdGen :: IO StdGen betterStdGen = alloca $ \p -> do h <- openBinaryFile "/dev/urandom" ReadMode hGetBuf h p $ sizeOf (undefined :: Int) hClose h mkStdGen <$> peek p
Maybe use a catch or something here and have it return "IO (Maybe StdGen)", with Nothing denoting that file not existing? -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com