diff --git a/Database/MongoDB/Structured.hs b/Database/MongoDB/Structured.hs
--- a/Database/MongoDB/Structured.hs
+++ b/Database/MongoDB/Structured.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -- | This module exports a /structued/ interface to MongoDB.
 -- Specifically, Haskell record types are used (in place of BSON)
 -- to represent documents which can be inserted and retrieved from
diff --git a/Database/MongoDB/Structured/Query.hs b/Database/MongoDB/Structured/Query.hs
--- a/Database/MongoDB/Structured/Query.hs
+++ b/Database/MongoDB/Structured/Query.hs
@@ -1,3 +1,7 @@
+{-# LANGUAGE CPP #-}
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 {-| This module exports several classes and combinators that operated on
   'Structured' types. Specifically, we provide the structured versions
   of @mongoDB@''s combinators, including structured query creation.
@@ -5,6 +9,7 @@
 {-# LANGUAGE Rank2Types #-}
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE UndecidableInstances #-}
 module Database.MongoDB.Structured.Query (
@@ -72,8 +77,9 @@
 import Data.Word
 import Data.CompactString.UTF8 (intercalate)
 import Control.Monad
-import Control.Monad.MVar
 import Control.Monad.IO.Class
+import Control.Monad.Trans.Control
+import Control.Monad.Base
 
 
 --
@@ -150,7 +156,7 @@
 --
 
 -- | Find documents satisfying query
-find :: (MonadControlIO m, Functor m)
+find :: (Functor m, MonadIO m, MonadBaseControl IO m)
      => StructuredQuery -> Action m StructuredCursor
 find q = StructuredCursor <$> (M.find . unStructuredQuery $ q)
 
@@ -179,13 +185,13 @@
 newtype StructuredCursor = StructuredCursor { unStructuredCursor :: M.Cursor }
 
 -- | Return next batch of structured documents.
-nextBatch :: (Structured a, MonadControlIO m, Functor m)
+nextBatch :: (Structured a, Functor m, MonadIO m, MonadBaseControl IO m)
           => StructuredCursor -> Action m [Maybe a]
 nextBatch c = (map fromBSON) <$> M.nextBatch (unStructuredCursor c)
 
 -- | Return next structured document. If failed return 'Left',
 -- otherwise 'Right' of the deserialized result.
-next :: (Structured a, MonadControlIO m)
+next :: (Structured a, MonadIO m, MonadBaseControl IO m)
      => StructuredCursor -> Action m (Either () (Maybe a))
 next c = do
     res <- M.next (unStructuredCursor c)
@@ -194,22 +200,22 @@
       Just r  -> return (Right $ fromBSON r)
 
 -- | Return up to next @N@ documents.
-nextN :: (Structured a, MonadControlIO m, Functor m)
+nextN :: (Structured a, Functor m, MonadIO m, MonadBaseControl IO m)
       => Int -> StructuredCursor -> Action m [Maybe a]
 nextN n c = (map fromBSON) <$> M.nextN n (unStructuredCursor c)
 
 
 -- | Return the remaining documents in query result.
-rest :: (Structured a, MonadControlIO m, Functor m)
+rest :: (Structured a, Functor m, MonadIO m, MonadBaseControl IO m) 
      => StructuredCursor -> Action m [Maybe a]
 rest c = (map fromBSON) <$> M.rest (unStructuredCursor c)
 
 -- | Close the cursor.
-closeCursor :: MonadControlIO m => StructuredCursor -> Action m ()
+closeCursor :: (MonadIO m, MonadBaseControl IO m) => StructuredCursor -> Action m ()
 closeCursor = M.closeCursor . unStructuredCursor
 
 -- | Check if the cursor is closed.
-isCursorClosed :: MonadIO m => StructuredCursor -> Action m Bool
+isCursorClosed :: (MonadIO m, MonadBase IO m) => StructuredCursor -> Action m Bool
 isCursorClosed = M.isCursorClosed . unStructuredCursor
 
 
diff --git a/Database/MongoDB/Structured/Types.hs b/Database/MongoDB/Structured/Types.hs
--- a/Database/MongoDB/Structured/Types.hs
+++ b/Database/MongoDB/Structured/Types.hs
@@ -1,5 +1,9 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE DeriveDataTypeable #-}
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
 -- | This module exports a 'Structued' type class which can be used to
 -- convert Haskel \"record types\" to @BSON@ objects and vice versa.
 -- As a Mongo document has an \"_id\" field, we impose the requirement
diff --git a/structured-mongoDB.cabal b/structured-mongoDB.cabal
--- a/structured-mongoDB.cabal
+++ b/structured-mongoDB.cabal
@@ -1,5 +1,5 @@
 Name:           structured-mongoDB
-Version:        0.1
+Version:        0.2
 build-type:     Simple
 License:        GPL
 License-File:   LICENSE
@@ -23,13 +23,15 @@
 
 Library
   Build-Depends: base >= 4 && < 5,
+                 transformers-base >= 0.4.1 && < 0.5,
+                 monad-control >= 0.3.1 && < 0.4,
                  array >= 0.2 && < 1,
                  bytestring >= 0.9 && < 1,
                  containers >= 0.2 && < 1,
                  mtl >= 1.1.0.2 && < 3,
                  transformers >= 0.2.2 && < 0.3,
                  old-time >= 1 && < 2,
-                 mongoDB >= 1.1.1 && <2,
+                 mongoDB >= 1.2.0 && <2,
                  bson >= 0.1.6 && <0.2,
                  compact-string-fix >= 0.3.2 && < 0.4,
                  template-haskell
