git.iko.soy/typeable/servant
on master help sign in
-Wall fixes
92d65aaJulian K. Arni
servant-client/src/Servant/Client.hs−1
@@ -16,7 +16,6 @@
16module Servant.Client
16module Servant.Client
17 ( client
17 ( client
18 , HasClient(..)
18 , HasClient(..)
19− , Client
20 , ServantError(..)
19 , ServantError(..)
21 , module Servant.Common.BaseUrl
20 , module Servant.Common.BaseUrl
22 ) where
21 ) where
servant-docs/src/Servant/Docs/Internal.hs+30−6
@@ -660,7 +660,11 @@ instance HasDocs Delete where
660 action' = action & response.respBody .~ []
660 action' = action & response.respBody .~ []
661 & response.respStatus .~ 204
661 & response.respStatus .~ 204
662
662
663+instance
664+#if MIN_VERSION_base(4,8,0)
665+ {-# OVERLAPPABLe #-}
666+#endif
663−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
667+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
664 => HasDocs (Get cts a) where
668 => HasDocs (Get cts a) where
665 docsFor Proxy (endpoint, action) =
669 docsFor Proxy (endpoint, action) =
666 single endpoint' action'
670 single endpoint' action'
@@ -671,7 +675,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
671 t = Proxy :: Proxy cts
675 t = Proxy :: Proxy cts
672 p = Proxy :: Proxy a
676 p = Proxy :: Proxy a
673
677
678+instance
679+#if MIN_VERSION_base(4,8,0)
680+ {-# OVERLAPPING #-}
681+#endif
674−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
682+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
675 , AllHeaderSamples ls , GetHeaders (HList ls) )
683 , AllHeaderSamples ls , GetHeaders (HList ls) )
676 => HasDocs (Get cts (Headers ls a)) where
684 => HasDocs (Get cts (Headers ls a)) where
677 docsFor Proxy (endpoint, action) =
685 docsFor Proxy (endpoint, action) =
@@ -694,7 +702,11 @@ instance (KnownSymbol sym, HasDocs sublayout)
694 action' = over headers (|> headername) action
702 action' = over headers (|> headername) action
695 headername = pack $ symbolVal (Proxy :: Proxy sym)
703 headername = pack $ symbolVal (Proxy :: Proxy sym)
696
704
705+instance
706+#if MIN_VERSION_base(4,8,0)
707+ {-# OVERLAPPABLE #-}
708+#endif
697−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
709+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
698 => HasDocs (Post cts a) where
710 => HasDocs (Post cts a) where
699 docsFor Proxy (endpoint, action) =
711 docsFor Proxy (endpoint, action) =
700 single endpoint' action'
712 single endpoint' action'
@@ -706,7 +718,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
706 t = Proxy :: Proxy cts
718 t = Proxy :: Proxy cts
707 p = Proxy :: Proxy a
719 p = Proxy :: Proxy a
708
720
721+instance
722+#if MIN_VERSION_base(4,8,0)
723+ {-# OVERLAPPING #-}
724+#endif
709−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
725+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
710 , AllHeaderSamples ls , GetHeaders (HList ls) )
726 , AllHeaderSamples ls , GetHeaders (HList ls) )
711 => HasDocs (Post cts (Headers ls a)) where
727 => HasDocs (Post cts (Headers ls a)) where
712 docsFor Proxy (endpoint, action) =
728 docsFor Proxy (endpoint, action) =
@@ -721,7 +737,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
721 t = Proxy :: Proxy cts
737 t = Proxy :: Proxy cts
722 p = Proxy :: Proxy a
738 p = Proxy :: Proxy a
723
739
740+instance
741+#if MIN_VERSION_base(4,8,0)
742+ {-# OVERLAPPABLE #-}
743+#endif
724−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
744+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
725 => HasDocs (Put cts a) where
745 => HasDocs (Put cts a) where
726 docsFor Proxy (endpoint, action) =
746 docsFor Proxy (endpoint, action) =
727 single endpoint' action'
747 single endpoint' action'
@@ -733,7 +753,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
733 t = Proxy :: Proxy cts
753 t = Proxy :: Proxy cts
734 p = Proxy :: Proxy a
754 p = Proxy :: Proxy a
735
755
756+instance
757+#if MIN_VERSION_base(4,8,0)
758+ {-# OVERLAPPING #-}
759+#endif
736−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
760+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
737 , AllHeaderSamples ls , GetHeaders (HList ls) )
761 , AllHeaderSamples ls , GetHeaders (HList ls) )
738 => HasDocs (Put cts (Headers ls a)) where
762 => HasDocs (Put cts (Headers ls a)) where
739 docsFor Proxy (endpoint, action) =
763 docsFor Proxy (endpoint, action) =
servant-examples/auth-combinator/auth-combinator.hs+2−2
@@ -26,7 +26,7 @@ isGoodCookie = return . (== "good password")
26data AuthProtected
26data AuthProtected
27
27
28instance HasServer rest => HasServer (AuthProtected :> rest) where
28instance HasServer rest => HasServer (AuthProtected :> rest) where
29− type ServerT' (AuthProtected :> rest) m = ServerT' rest m
29+ type ServerT (AuthProtected :> rest) m = ServerT rest m
30
30
31 route Proxy a request respond =
31 route Proxy a request respond =
32 case lookup "Cookie" (requestHeaders request) of
32 case lookup "Cookie" (requestHeaders request) of
@@ -75,4 +75,4 @@ $ curl -H "Cookie: good password" http://localhost:8080/private
75[{"ssshhh":"this is a secret"}]
75[{"ssshhh":"this is a secret"}]
76$ curl -H "Cookie: bad password" http://localhost:8080/private
76$ curl -H "Cookie: bad password" http://localhost:8080/private
77Invalid cookie.
77Invalid cookie.
78−-}
78+-}
servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs+3−3
@@ -22,7 +22,7 @@ data Authorization (sym :: Symbol) a
22
22
23instance (KnownSymbol sym, HasJQ sublayout)
23instance (KnownSymbol sym, HasJQ sublayout)
24 => HasJQ (Authorization sym a :> sublayout) where
24 => HasJQ (Authorization sym a :> sublayout) where
25− type JQ' (Authorization sym a :> sublayout) = JQ' sublayout
25+ type JQ (Authorization sym a :> sublayout) = JQ sublayout
26
26
27 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
27 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
28 req & reqHeaders <>~ [ ReplaceHeaderArg "Authorization" $
28 req & reqHeaders <>~ [ ReplaceHeaderArg "Authorization" $
@@ -35,7 +35,7 @@ data MyLovelyHorse a
35
35
36instance (HasJQ sublayout)
36instance (HasJQ sublayout)
37 => HasJQ (MyLovelyHorse a :> sublayout) where
37 => HasJQ (MyLovelyHorse a :> sublayout) where
38− type JQ' (MyLovelyHorse a :> sublayout) = JQ' sublayout
38+ type JQ (MyLovelyHorse a :> sublayout) = JQ sublayout
39
39
40 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
40 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
41 req & reqHeaders <>~ [ ReplaceHeaderArg "X-MyLovelyHorse" tpl ]
41 req & reqHeaders <>~ [ ReplaceHeaderArg "X-MyLovelyHorse" tpl ]
@@ -47,7 +47,7 @@ data WhatsForDinner a
47
47
48instance (HasJQ sublayout)
48instance (HasJQ sublayout)
49 => HasJQ (WhatsForDinner a :> sublayout) where
49 => HasJQ (WhatsForDinner a :> sublayout) where
50− type JQ' (WhatsForDinner a :> sublayout) = JQ' sublayout
50+ type JQ (WhatsForDinner a :> sublayout) = JQ sublayout
51
51
52 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
52 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
53 req & reqHeaders <>~ [ ReplaceHeaderArg "X-WhatsForDinner" tpl ]
53 req & reqHeaders <>~ [ ReplaceHeaderArg "X-WhatsForDinner" tpl ]
servant-lucid/servant-lucid.cabal+1−1
@@ -20,7 +20,7 @@ library
20 exposed-modules: Servant.HTML.Lucid
20 exposed-modules: Servant.HTML.Lucid
21 -- other-modules:
21 -- other-modules:
22 -- other-extensions:
22 -- other-extensions:
23− build-depends: base >=4.7 && <4.8
23+ build-depends: base >=4.7 && <5
24 , http-media
24 , http-media
25 , lucid
25 , lucid
26 , servant
26 , servant
servant-server/src/Servant/Server/Internal/Enter.hs+2−1
@@ -3,7 +3,6 @@
3{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE FunctionalDependencies #-}
4{-# LANGUAGE FunctionalDependencies #-}
5{-# LANGUAGE MultiParamTypeClasses #-}
5{-# LANGUAGE MultiParamTypeClasses #-}
6−{-# LANGUAGE OverlappingInstances #-}
7{-# LANGUAGE RankNTypes #-}
6{-# LANGUAGE RankNTypes #-}
8{-# LANGUAGE ScopedTypeVariables #-}
7{-# LANGUAGE ScopedTypeVariables #-}
9{-# LANGUAGE TypeFamilies #-}
8{-# LANGUAGE TypeFamilies #-}
@@ -11,7 +10,9 @@
11{-# LANGUAGE UndecidableInstances #-}
10{-# LANGUAGE UndecidableInstances #-}
12module Servant.Server.Internal.Enter where
11module Servant.Server.Internal.Enter where
13
12
13+#if !MIN_VERSION_base(4,8,0)
14import Control.Applicative
14import Control.Applicative
15+#endif
15import qualified Control.Category as C
16import qualified Control.Category as C
16#if MIN_VERSION_mtl(2,2,1)
17#if MIN_VERSION_mtl(2,2,1)
17import Control.Monad.Except
18import Control.Monad.Except
servant/src/Servant/API.hs−1
@@ -54,7 +54,6 @@ module Servant.API (
54 -- | Type-safe internal URIs
54 -- | Type-safe internal URIs
55 ) where
55 ) where
56
56
57−import Data.Proxy (Proxy (..))
58import Servant.API.Alternative ((:<|>) (..))
57import Servant.API.Alternative ((:<|>) (..))
59import Servant.API.Capture (Capture)
58import Servant.API.Capture (Capture)
60import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
59import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,