Jelajahi Sumber

move the JSON generation out of the transaction

Raphael Javaux 12 tahun lalu
induk
melakukan
59b767eff3
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      yesod/bench/Application.hs

+ 1 - 1
yesod/bench/Application.hs

@@ -32,7 +32,7 @@ getDB2R n = do
     !is <- force . take n . randomRs (1, 10000) <$> liftIO newStdGen
 
     ns <- runDB $
-        forM is $\i -> do
+        forM is $ \i -> do
             Just o <- get $ Key $ PersistInt64 i
             return (i, worldRandomNumber o)