@@ -1,9 +1,9 @@
1{-# LANGUAGE DataKinds #-}
1{-# LANGUAGE DataKinds #-}
2−{-# OPTIONS_GHC -fdefer-type-errors #-}
2+{-# OPTIONS_GHC -fdefer-type-errors -Wwarn #-}
3module Servant.Server.Internal.ContextSpec (spec) where
3module Servant.Server.Internal.ContextSpec (spec) where
5import Data.Proxy (Proxy (..))
5import Data.Proxy (Proxy (..))
6−import Test.Hspec (Spec, describe, it, shouldBe, pending, context)
6+import Test.Hspec (Spec, describe, it, shouldBe, context)
7import Test.ShouldNotTypecheck (shouldNotTypecheck)
7import Test.ShouldNotTypecheck (shouldNotTypecheck)
9import Servant.API
9import Servant.API
@@ -26,16 +26,17 @@ spec = do
26 shouldNotTypecheck x
26 shouldNotTypecheck x
28 context "Show instance" $ do
28 context "Show instance" $ do
29− let cxt = 'a' :. True :. EmptyContext
30 it "has a Show instance" $ do
29 it "has a Show instance" $ do
30+ let cxt = 'a' :. True :. EmptyContext
31 show cxt `shouldBe` "'a' :. True :. EmptyContext"
31 show cxt `shouldBe` "'a' :. True :. EmptyContext"
33 context "bracketing" $ do
33 context "bracketing" $ do
34 it "works" $ do
34 it "works" $ do
35+ let cxt = 'a' :. True :. EmptyContext
35 show (Just cxt) `shouldBe` "Just ('a' :. True :. EmptyContext)"
36 show (Just cxt) `shouldBe` "Just ('a' :. True :. EmptyContext)"
37 it "works with operators" $ do
38 it "works with operators" $ do
38− let cxt = (1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)
39+ let cxt = ((1 :: Integer) :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)
39 show cxt `shouldBe` "(1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)"
40 show cxt `shouldBe` "(1 :. 'a' :. EmptyContext) :<|> ('b' :. True :. EmptyContext)"
41 describe "descendIntoNamedContext" $ do
42 describe "descendIntoNamedContext" $ do