diff --git a/mime-mail-ses/Network/Mail/Mime/SES.hs b/mime-mail-ses/Network/Mail/Mime/SES.hs index aa6ddd7..a2de794 100644 --- a/mime-mail-ses/Network/Mail/Mime/SES.hs +++ b/mime-mail-ses/Network/Mail/Mime/SES.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Network.Mail.Mime.SES @@ -15,7 +16,11 @@ import System.Locale (defaultTimeLocale) import Data.Time (getCurrentTime) import qualified Data.ByteString.Char8 as S8 import Crypto.HMAC +#if MIN_VERSION_cryptohash(0, 10, 0) +import Crypto.Hash.CryptoAPI (SHA256) +#else import Crypto.Hash.SHA256 (SHA256) +#endif import Data.ByteString.Base64 (encode) import qualified Data.Serialize as S import Control.Monad.Trans.Resource (MonadResource) diff --git a/mime-mail-ses/mime-mail-ses.cabal b/mime-mail-ses/mime-mail-ses.cabal index ef90893..4ad2acd 100644 --- a/mime-mail-ses/mime-mail-ses.cabal +++ b/mime-mail-ses/mime-mail-ses.cabal @@ -1,5 +1,5 @@ Name: mime-mail-ses -Version: 0.2.1.2 +Version: 0.2.1.3 Synopsis: Send mime-mail messages via Amazon SES Homepage: http://github.com/snoyberg/mime-mail License: MIT @@ -26,4 +26,5 @@ Library , transformers >= 0.2 , http-types >= 0.6.8 , monad-control >= 0.3 + , cryptohash-cryptoapi ghc-options: -Wall