diff --git a/lib/Numeric/Sampling.hs b/lib/Numeric/Sampling.hs
--- a/lib/Numeric/Sampling.hs
+++ b/lib/Numeric/Sampling.hs
@@ -55,9 +55,7 @@
 
 -- | (/O(n)/) 'sample' specialized to IO.
 sampleIO :: Foldable f => Int -> f a -> IO (Maybe [a])
-sampleIO n xs = do
-  gen <- createSystemRandom
-  sample n xs gen
+sampleIO n xs = withSystemRandom . asGenIO $ sample n xs
 {-# INLINABLE sampleIO #-}
 
 -- | (/O(n log n)/) Sample uniformly with replacement (bootstrap).
@@ -71,9 +69,7 @@
 
 -- | (/O(n log n)/) 'resample' specialized to IO.
 resampleIO :: Foldable f => Int -> f a -> IO [a]
-resampleIO n xs = do
-  gen <- createSystemRandom
-  resample n xs gen
+resampleIO n xs = withSystemRandom . asGenIO $ resample n xs
 {-# INLINABLE resampleIO #-}
 
 -- | (/O(n log n)/) Unequal probability sampling.
diff --git a/sampling.cabal b/sampling.cabal
--- a/sampling.cabal
+++ b/sampling.cabal
@@ -1,5 +1,5 @@
 name:                sampling
-version:             0.3.2
+version:             0.3.3
 synopsis:            Sample values from collections.
 homepage:            https://github.com/jtobin/sampling
 license:             MIT
@@ -36,7 +36,7 @@
   exposed-modules:
       Numeric.Sampling
   build-depends:
-      base        > 4.8 && < 5
+      base        > 4.8 && < 6
     , containers  >= 0.5 && < 1
     , foldl       >= 1.1 && < 2
     , mwc-random  >= 0.13 && < 0.14
