summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Rackspace/MailGun.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Rackspace/MailGun.hs b/src/Rackspace/MailGun.hs
index fda50ba..4e0019b 100644
--- a/src/Rackspace/MailGun.hs
+++ b/src/Rackspace/MailGun.hs
@@ -11,6 +11,7 @@ module Rackspace.MailGun
) where
import Control.Failure
+import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class
import Control.Monad.Trans.Control
import Data.ByteString.Char8 as BS (ByteString, pack,
@@ -63,13 +64,13 @@ buildBase msg = partText "from" (from msg)
++ partMaybeText "subject" (subject msg)
++ buildTail msg
-sendMessage :: (Failure HttpException m, MonadBaseControl IO m, MonadIO m) =>
+sendMessage :: (Failure HttpException m, MonadThrow m, MonadBaseControl IO m, MonadIO m) =>
String -> String -> Message -> m (Response LBS.ByteString)
sendMessage domain apiKey message = do
withManager $ \manager -> do
sendWith manager domain apiKey message
-sendWith :: (Failure HttpException m, MonadBaseControl IO m, MonadIO m) =>
+sendWith :: (Failure HttpException m, MonadThrow m, MonadBaseControl IO m, MonadIO m) =>
Manager -> String -> String -> Message -> m (Response LBS.ByteString)
sendWith manager domain apiKey message = do
initReq <- parseUrl $ baseUrl ++ "/" ++ domain ++ "/messages"