fix build with old random
authorJoey Hess <joeyh@joeyh.name>
Mon, 30 Sep 2024 21:36:19 +0000 (17:36 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 30 Sep 2024 21:36:19 +0000 (17:36 -0400)
getStdGen used to be an IO not a MonadIO action

Command/Sim.hs

index 47a8d09e508babf24fb51771303b606be9e6eb06..26398772fd34fdc7eeece3782b6296bc13fb1cb7 100644 (file)
@@ -66,7 +66,7 @@ startsim' simfile = do
                giveup "A sim was previously started. Use `git-annex sim end` to stop it before starting a new one."
        
        showLongNote $ UnquotedString "Sim started."
-       rng <- fst . random <$> getStdGen
+       rng <- liftIO $ fst . random <$> getStdGen
        let st = emptySimState rng simdir
        case simfile of
                Nothing -> startup simdir st []