From 2f2cc38c280276df010521b9bc59e50c65db01f1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 2 Jul 2024 12:27:14 -0400 Subject: [PATCH] fix build on old ghc getStdRandom used to be an IO action --- Annex/Cluster.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Annex/Cluster.hs b/Annex/Cluster.hs index e632295a95..3c0bc7e3a2 100644 --- a/Annex/Cluster.hs +++ b/Annex/Cluster.hs @@ -160,7 +160,7 @@ clusterProxySelector clusteruuid protocolversion (Bypass bypass) = do let lowestcost = Remote.cost (remote node) samecost = node : takeWhile (\n -> Remote.cost (remote n) == lowestcost) rest in do - n <- getStdRandom $ + n <- liftIO $ getStdRandom $ randomR (0, length samecost - 1) return (Just (samecost !! n))