fix build on old ghc

getStdRandom used to be an IO action
This commit is contained in:
Joey Hess 2024-07-02 12:27:14 -04:00
parent a65068fb66
commit 2f2cc38c28
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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))