diff --git a/crypto-random-effect.cabal b/crypto-random-effect.cabal
--- a/crypto-random-effect.cabal
+++ b/crypto-random-effect.cabal
@@ -2,7 +2,7 @@
 --  documentation, see http://haskell.org/cabal/users-guide/
 
 name:                crypto-random-effect
-version:             0.2.0.2
+version:             0.2.0.3
 synopsis:            A random effect using crypto-random
 description:         Any help (especially documentation) is welcome
 homepage:            https://github.com/ibotty/crypto-random-effect
@@ -23,8 +23,9 @@
   build-depends:       base >=4.6 && <5
                      , bytestring <= 0.11
                      , crypto-random >=0.0.7 && <0.1
-                     , extensible-effects ==1.4.*
+                     , extensible-effects ==1.4.* || ==1.7.*
                      , securemem ==0.1.*
+                     , transformers >=0.3 && <0.5
   hs-source-dirs:      src
   default-language:    Haskell2010
 
diff --git a/src/Crypto/Random/Effect.hs b/src/Crypto/Random/Effect.hs
--- a/src/Crypto/Random/Effect.hs
+++ b/src/Crypto/Random/Effect.hs
@@ -27,6 +27,7 @@
   , EntropyPool()
   ) where
 
+import Control.Applicative ((<$>))
 import Control.Eff
 import Control.Eff.Lift
 import Control.Eff.State.Strict
@@ -108,7 +109,7 @@
 --
 -- > randomBytes cnt >>= return . f
 withRandomBytes :: (SetMember RNG (State gen) r, CPRG gen, Typeable gen) => Int -> (ByteString -> a) -> Eff r a
-withRandomBytes cnt f = randomBytes cnt >>= return . f
+withRandomBytes cnt f = f <$> randomBytes cnt
 
 -- Create a new entropy pool.
 createEntropyPool :: SetMember Lift (Lift IO) r => Eff r EntropyPool
