@@ -6,7 +6,7 @@ module QC.Rechunked (
66 ) where
77
88import Control.Monad (forM, forM_)
9−import Control.Monad.ST (runST)
9+import Control.Monad.ST (ST, runST)
1010import Data.List (unfoldr)
1111import Test.QuickCheck (Gen, choose)
1212import qualified Data.ByteString as B
@@ -49,6 +49,7 @@ fisherYates xs = (V.toList . V.backpermute v) `fmap` swapIndices (G.length v)
4949 return (runST (swapAll swaps))
5050 where
5151 n = n0 - 1
52+ swapAll :: [(Int,Int)] -> ST s (V.Vector Int)
5253 swapAll ijs = do
5354 mv <- G.unsafeThaw (G.enumFromTo 0 n :: V.Vector Int)
5455 forM_ ijs $ uncurry (M.swap mv)