Explorar o código

improved random generator

Raphael Javaux %!s(int64=12) %!d(string=hai) anos
pai
achega
9b69c53fc8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      yesod/bench/Application.hs

+ 1 - 1
yesod/bench/Application.hs

@@ -28,7 +28,7 @@ getDBR = do
 
 getDB2R :: Int -> Handler RepJson
 getDB2R n = do
-    is <- force . take n . randomRs (1, 10000) <$> newStdGen
+    is <- force . take n . randomRs (1, 10000) <$> liftIO newStdGen
 
     os <- runDB $
         forM is $ \i-> do