From fcb0a727b4e55c926121ca8a90712c0d536bf5fc Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Sat, 19 Mar 2016 10:08:48 +0100 Subject: [PATCH] More Werror fixes --- servant-js/src/Servant/JS/Internal.hs | 3 +-- servant-server/test/Servant/Server/Internal/ContextSpec.hs | 6 +++--- .../test/Servant/Server/UsingContextSpec/TestCombinators.hs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/servant-js/src/Servant/JS/Internal.hs b/servant-js/src/Servant/JS/Internal.hs index 3c817e1e..5d94cf6d 100644 --- a/servant-js/src/Servant/JS/Internal.hs +++ b/servant-js/src/Servant/JS/Internal.hs @@ -23,7 +23,6 @@ module Servant.JS.Internal , HasForeignType(..) , GenerateList(..) , NoTypes - , HeaderArg , ArgType(..) , HeaderArg(..) , QueryArg(..) @@ -47,7 +46,7 @@ module Servant.JS.Internal , Header ) where -import Control.Lens hiding (List) +import Control.Lens (makePrisms, makeLenses, Getter, (&), (<>~), (.~), (%~)) import qualified Data.CharSet as Set import qualified Data.CharSet.Unicode.Category as Set import Data.Monoid diff --git a/servant-server/test/Servant/Server/Internal/ContextSpec.hs b/servant-server/test/Servant/Server/Internal/ContextSpec.hs index dfac1e2e..f0a302e6 100644 --- a/servant-server/test/Servant/Server/Internal/ContextSpec.hs +++ b/servant-server/test/Servant/Server/Internal/ContextSpec.hs @@ -3,7 +3,7 @@ module Servant.Server.Internal.ContextSpec (spec) where import Data.Proxy (Proxy (..)) -import Test.Hspec (Spec, describe, it, shouldBe, pending, context) +import Test.Hspec (Spec, describe, it, shouldBe, context) import Test.ShouldNotTypecheck (shouldNotTypecheck) import Servant.API @@ -35,8 +35,8 @@ spec = do show (Just cxt) `shouldBe` "Just ('a' :. True :. EmptyContext)" it "works with operators" $ do - let cxt = (1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext) - show cxt `shouldBe` "(1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)" + let cxt' = ((1 :: Int) :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext) + show cxt' `shouldBe` "(1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)" describe "descendIntoNamedContext" $ do let cxt :: Context [Char, NamedContext "sub" '[Char]] diff --git a/servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs b/servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs index 48595c9c..0c958cd8 100644 --- a/servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs +++ b/servant-server/test/Servant/Server/UsingContextSpec/TestCombinators.hs @@ -36,7 +36,7 @@ instance (HasContextEntry context String, HasServer subApi context) => subProxy :: Proxy subApi subProxy = Proxy - inject context f = f (getContextEntry context) + inject ctx f = f (getContextEntry ctx) data InjectIntoContext