diff --git a/Random.hs b/Random.hs
--- a/Random.hs
+++ b/Random.hs
@@ -30,7 +30,7 @@
 
     default skipM :: (Mut (PrimState m) g ~ MutVar (PrimState m) g,
                       PrimMonad m) => Natural -> ReaderT (Mut (PrimState m) g) m ()
-    skipM = flip replicateA_ (() <$ uniformNativeM)
+    skipM = flip mtimesA (() <$ uniformNativeM)
 
 class Split g where
     split :: g -> (g, g)
@@ -47,8 +47,17 @@
 uniformM = liftUniform uniformNativeM
 
 instance {-# OVERLAPPABLE #-} (Bounded a, Enum a, Bounded b, Enum b) => Uniform b a where
-    liftUniform = fmap (toEnum' . foldr (\ m n -> card @b * n + fromEnum' m) 0)
-                . replicateA ((card @a + card @b - 1) `div` card @b)
+    liftUniform = untilJust
+                . fmap (toEnumMayWrap' . foldr (\ m n -> card @b * n + fromEnum' m) 0)
+                . replicateA @_ @[] r
+      where toEnumMayWrap' :: Natural -> Maybe a
+            toEnumMayWrap' n | n > r * card @b `div` card @a * card @a = Nothing
+                             | otherwise = toEnumMay' (n `div` card @a)
 
+            r = (card @a + card @b - 1) `div` card @b
+
 instance Uniform Void a where
     liftUniform = fmap $ \ case
+
+instance Uniform a () where
+    liftUniform = (() <$)
diff --git a/Util.hs b/Util.hs
--- a/Util.hs
+++ b/Util.hs
@@ -1,30 +1,17 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE AllowAmbiguousTypes #-}
 
-module Util where
+module Util (card, fromEnum', toEnumMay', module U) where
 
-import Control.Applicative
 import qualified Data.List as L
-import Data.Semigroup
 import Numeric.Natural
-
-replicateA :: Applicative p => Natural -> p a -> p [a]
-replicateA n = sequenceA . L.genericReplicate n
-
-replicateA_ :: Applicative p => Natural -> p () -> p ()
-replicateA_ n = unAp . stimes n . Ap
-
-newtype Ap p a = Ap { unAp :: p a } deriving (Functor, Applicative)
-instance (Applicative p, Semigroup a) => Semigroup (Ap p a) where (<>) = liftA2 (<>)
-instance (Applicative p, Semigroup a, Monoid a) => Monoid (Ap p a) where
-    mempty = pure mempty
-    mappend = (<>)
+import "util" Util as U
 
 card :: ∀ a . (Bounded a, Enum a) => Natural
 card = L.genericLength [minBound @a..]
-            
+
 fromEnum' :: (Bounded a, Enum a) => a -> Natural
 fromEnum' a = L.genericLength [minBound..a] - 1
 
-toEnum' :: (Bounded a, Enum a) => Natural -> a
-toEnum' = L.genericIndex [minBound..]
+toEnumMay' :: (Bounded a, Enum a) => Natural -> Maybe a
+toEnumMay' = (!!?) [minBound..]
diff --git a/random-class.cabal b/random-class.cabal
--- a/random-class.cabal
+++ b/random-class.cabal
@@ -1,5 +1,5 @@
 name:                random-class
-version:             0.1.1.0
+version:             0.1.2.0
 synopsis:            Class of random value generation
 -- description:         
 license:             BSD3
@@ -18,6 +18,7 @@
   build-depends:       base >=4.9 && <5
                      , primitive
                      , transformers
+                     , util >=0.1.2 && <0.2
   -- hs-source-dirs:      
   default-language:    Haskell2010
   default-extensions:  UnicodeSyntax
@@ -31,4 +32,5 @@
                      , MultiParamTypeClasses
                      , FlexibleContexts
                      , FlexibleInstances
+                     , PackageImports
   ghc-options:         -Wall -Wno-name-shadowing
