From db0931941b29849c025bd5447b8ceb6bff7dbb3e Mon Sep 17 00:00:00 2001 From: aaron levin Date: Sat, 8 Aug 2015 11:50:40 -0400 Subject: [PATCH] Cleanup import failures and compiler warnings --- servant-server/src/Servant/Server/Internal.hs | 8 +++++--- .../src/Servant/Server/Internal/Authentication.hs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index ce7a80bd..a12b2e86 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -33,7 +33,7 @@ import qualified Data.ByteString.Lazy as BL import qualified Data.Map as M import Data.Maybe (mapMaybe, fromMaybe) import Data.String (fromString) -import Data.String.Conversions (cs, (<>), ConvertibleStrings) +import Data.String.Conversions (ConvertibleStrings, cs, (<>)) import Data.Text (Text) import qualified Data.Text as T import Data.Text.Encoding (decodeUtf8, @@ -50,6 +50,8 @@ import Network.Wai (Application, lazyRequestBody, rawQueryString, remoteHost, + Response, + Request, requestHeaders, requestMethod, responseLBS, vault) @@ -79,8 +81,8 @@ import Servant.Common.Text (FromText, fromText) import Servant.Server.Internal.Authentication (AuthData (authData), AuthProtected (..), checkAuthStrict, - onMissingAuthData, - onUnauthenticated) + AuthHandlers(onMissingAuthData, + onUnauthenticated)) import Servant.Server.Internal.PathInfo import Servant.Server.Internal.Router import Servant.Server.Internal.RoutingApplication diff --git a/servant-server/src/Servant/Server/Internal/Authentication.hs b/servant-server/src/Servant/Server/Internal/Authentication.hs index 02c09893..f594bc29 100644 --- a/servant-server/src/Servant/Server/Internal/Authentication.hs +++ b/servant-server/src/Servant/Server/Internal/Authentication.hs @@ -6,7 +6,7 @@ module Servant.Server.Internal.Authentication ( AuthProtected (..) , AuthData (..) -, AuthHandlers (..) +, AuthHandlers (AuthHandlers, onMissingAuthData, onUnauthenticated) , basicAuthLax , basicAuthStrict , laxProtect @@ -36,7 +36,7 @@ class AuthData a where -- | handlers to deal with authentication failures. data AuthHandlers authData = AuthHandlers { -- we couldn't find the right type of auth data (or any, for that matter) - onMissingauthData :: IO Response + onMissingAuthData :: IO Response , -- we found the right type of auth data in the request but the check failed onUnauthenticated :: authData -> IO Response