From 5bd4789387c8ed6aa102b1ad248251116d4714a9 Mon Sep 17 00:00:00 2001 From: Alp Mestanogullari Date: Mon, 10 Aug 2015 11:11:11 +0200 Subject: [PATCH] fix some build errors on 7.8/7.10 --- servant-server/src/Servant/Server/Internal.hs | 2 +- servant-server/src/Servant/Server/Internal/Authentication.hs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index 3761de29..b2ad3427 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -23,7 +23,7 @@ module Servant.Server.Internal ) where #if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) +import Control.Applicative ((<$>), pure) #endif import Control.Monad.Trans.Except (ExceptT) import qualified Data.ByteString as B diff --git a/servant-server/src/Servant/Server/Internal/Authentication.hs b/servant-server/src/Servant/Server/Internal/Authentication.hs index 3bbee785..f050969c 100644 --- a/servant-server/src/Servant/Server/Internal/Authentication.hs +++ b/servant-server/src/Servant/Server/Internal/Authentication.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -16,7 +17,11 @@ module Servant.Server.Internal.Authentication import Control.Monad (guard) import qualified Data.ByteString as B import Data.ByteString.Base64 (decodeLenient) +#if !MIN_VERSION_base(4,8,0) import Data.Monoid ((<>), mempty) +#else +import Data.Monoid ((<>)) +#endif import Data.Proxy (Proxy (Proxy)) import Data.String (fromString) import Data.Word8 (isSpace, toLower, _colon)