Explorar el Código

move the JSON generation out of the transaction

Raphael Javaux hace 12 años
padre
commit
62725e7851
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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
     !is <- force . take n . randomRs (1, 10000) <$> liftIO newStdGen
 
 
     ns <- runDB $
     ns <- runDB $
-        forM is $\i -> do
+        forM is $ \i -> do
             Just o <- get $ Key $ PersistInt64 i
             Just o <- get $ Key $ PersistInt64 i
             return (i, worldRandomNumber o)
             return (i, worldRandomNumber o)