diff --git a/source/library/Wuss.hs b/source/library/Wuss.hs
--- a/source/library/Wuss.hs
+++ b/source/library/Wuss.hs
@@ -52,8 +52,12 @@
   , runSecureClientWithConfig
   ) where
 
+import Prelude (($), (.))
+
 import qualified Control.Applicative as Applicative
 import qualified Control.Exception as Exception
+import qualified Control.Monad.IO.Class as MonadIO
+import qualified Control.Monad.Catch as Catch
 import qualified Data.Bool as Bool
 import qualified Data.ByteString as StrictBytes
 import qualified Data.ByteString.Lazy as LazyBytes
@@ -74,11 +78,13 @@
     >>> runSecureClient "echo.websocket.org" 443 "/" app
 -}
 runSecureClient
-  :: Socket.HostName -- ^ Host
+  :: MonadIO.MonadIO m
+  => Catch.MonadMask m
+  => Socket.HostName -- ^ Host
   -> Socket.PortNumber -- ^ Port
   -> String.String -- ^ Path
   -> WebSockets.ClientApp a -- ^ Application
-  -> IO.IO a
+  -> m a
 runSecureClient host port path app = do
   let options = WebSockets.defaultConnectionOptions
   runSecureClientWith host port path options [] app
@@ -123,13 +129,15 @@
     >     return ()
 -}
 runSecureClientWith
-  :: Socket.HostName -- ^ Host
+  :: MonadIO.MonadIO m
+  => Catch.MonadMask m
+  => Socket.HostName -- ^ Host
   -> Socket.PortNumber -- ^ Port
   -> String.String -- ^ Path
   -> WebSockets.ConnectionOptions -- ^ Options
   -> WebSockets.Headers -- ^ Headers
   -> WebSockets.ClientApp a -- ^ Application
-  -> IO.IO a
+  -> m a
 runSecureClientWith host port path options headers app = do
   let config = defaultConfig
   runSecureClientWithConfig host port path config options headers app
@@ -152,20 +160,22 @@
 
 -- | Runs a secure WebSockets client with the given 'Config'.
 runSecureClientWithConfig
-  :: Socket.HostName -- ^ Host
+  :: MonadIO.MonadIO m
+  => Catch.MonadMask m
+  => Socket.HostName -- ^ Host
   -> Socket.PortNumber -- ^ Port
   -> String.String -- ^ Path
   -> Config -- ^ Config
   -> WebSockets.ConnectionOptions -- ^ Options
   -> WebSockets.Headers -- ^ Headers
   -> WebSockets.ClientApp a -- ^ Application
-  -> IO.IO a
+  -> m a
 runSecureClientWithConfig host port path config options headers app = do
-  context <- Connection.initConnectionContext
-  Exception.bracket
-    (Connection.connectTo context (connectionParams host port))
-    Connection.connectionClose
-    (\connection -> do
+  context <- MonadIO.liftIO Connection.initConnectionContext
+  Catch.bracket
+    (MonadIO.liftIO $ Connection.connectTo context (connectionParams host port))
+    (MonadIO.liftIO . Connection.connectionClose)
+    (\connection -> MonadIO.liftIO $ do
       stream <- Stream.makeStream
         (reader config connection)
         (writer connection)
diff --git a/wuss.cabal b/wuss.cabal
--- a/wuss.cabal
+++ b/wuss.cabal
@@ -1,7 +1,7 @@
 cabal-version: 2.2
 
 name: wuss
-version: 2.0.0.2
+version: 2.0.1.0
 
 synopsis: Secure WebSocket (WSS) clients
 description:
@@ -36,6 +36,7 @@
     , connection >= 0.3.1 && < 0.4
     , network >= 3.1.1 && < 3.2
     , websockets >= 0.12.7 && < 0.13
+    , exceptions >= 0.10 && < 0.11
   default-language: Haskell2010
   ghc-options:
     -Weverything
