浏览代码

improved random generator

Raphael Javaux 12 年之前
父节点
当前提交
bbaf1dbd6f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      yesod/bench/Application.hs

+ 1 - 1
yesod/bench/Application.hs

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