on master help sign in
-Wall fixes
commit92d65aaf49ad34adeb7009517006915d7041020c authorJulian K. Arni <jkarni@gmail.com> dateSun 3 May 2015, 01:53 (11 years ago) parent84211d4
7 files changed+38−15
servant-client/src/Servant/Client.hs−1 servant-docs/src/Servant/Docs/Internal.hs+30−6 servant-examples/auth-combinator/auth-combinator.hs+2−2 servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs+3−3 servant-lucid/servant-lucid.cabal+1−1 servant-server/src/Servant/Server/Internal/Enter.hs+2−1 servant/src/Servant/API.hs−1
servant-client/src/Servant/Client.hs−1
@@ -16,7 +16,6 @@
1616module Servant.Client
1717 ( client
1818 , HasClient(..)
19− , Client
2019 , ServantError(..)
2120 , module Servant.Common.BaseUrl
2221 ) where
servant-docs/src/Servant/Docs/Internal.hs+30−6
@@ -660,7 +660,11 @@ instance HasDocs Delete where
660660 action' = action & response.respBody .~ []
661661 & response.respStatus .~ 204
662662
663−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
663+instance
664+#if MIN_VERSION_base(4,8,0)
665+ {-# OVERLAPPABLe #-}
666+#endif
667+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
664668 => HasDocs (Get cts a) where
665669 docsFor Proxy (endpoint, action) =
666670 single endpoint' action'
@@ -671,7 +675,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
671675 t = Proxy :: Proxy cts
672676 p = Proxy :: Proxy a
673677
674−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
678+instance
679+#if MIN_VERSION_base(4,8,0)
680+ {-# OVERLAPPING #-}
681+#endif
682+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
675683 , AllHeaderSamples ls , GetHeaders (HList ls) )
676684 => HasDocs (Get cts (Headers ls a)) where
677685 docsFor Proxy (endpoint, action) =
@@ -694,7 +702,11 @@ instance (KnownSymbol sym, HasDocs sublayout)
694702 action' = over headers (|> headername) action
695703 headername = pack $ symbolVal (Proxy :: Proxy sym)
696704
697−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
705+instance
706+#if MIN_VERSION_base(4,8,0)
707+ {-# OVERLAPPABLE #-}
708+#endif
709+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
698710 => HasDocs (Post cts a) where
699711 docsFor Proxy (endpoint, action) =
700712 single endpoint' action'
@@ -706,7 +718,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
706718 t = Proxy :: Proxy cts
707719 p = Proxy :: Proxy a
708720
709−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
721+instance
722+#if MIN_VERSION_base(4,8,0)
723+ {-# OVERLAPPING #-}
724+#endif
725+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
710726 , AllHeaderSamples ls , GetHeaders (HList ls) )
711727 => HasDocs (Post cts (Headers ls a)) where
712728 docsFor Proxy (endpoint, action) =
@@ -721,7 +737,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
721737 t = Proxy :: Proxy cts
722738 p = Proxy :: Proxy a
723739
724−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
740+instance
741+#if MIN_VERSION_base(4,8,0)
742+ {-# OVERLAPPABLE #-}
743+#endif
744+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
725745 => HasDocs (Put cts a) where
726746 docsFor Proxy (endpoint, action) =
727747 single endpoint' action'
@@ -733,7 +753,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts)
733753 t = Proxy :: Proxy cts
734754 p = Proxy :: Proxy a
735755
736−instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
756+instance
757+#if MIN_VERSION_base(4,8,0)
758+ {-# OVERLAPPING #-}
759+#endif
760+ (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts
737761 , AllHeaderSamples ls , GetHeaders (HList ls) )
738762 => HasDocs (Put cts (Headers ls a)) where
739763 docsFor Proxy (endpoint, action) =
servant-examples/auth-combinator/auth-combinator.hs+2−2
@@ -26,7 +26,7 @@ isGoodCookie = return . (== "good password")
2626data AuthProtected
2727
2828instance HasServer rest => HasServer (AuthProtected :> rest) where
29− type ServerT' (AuthProtected :> rest) m = ServerT' rest m
29+ type ServerT (AuthProtected :> rest) m = ServerT rest m
3030
3131 route Proxy a request respond =
3232 case lookup "Cookie" (requestHeaders request) of
@@ -75,4 +75,4 @@ $ curl -H "Cookie: good password" http://localhost:8080/private
7575[{"ssshhh":"this is a secret"}]
7676$ curl -H "Cookie: bad password" http://localhost:8080/private
7777Invalid cookie.
78−-}
78+-}
servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs+3−3
@@ -22,7 +22,7 @@ data Authorization (sym :: Symbol) a
2222
2323instance (KnownSymbol sym, HasJQ sublayout)
2424 => HasJQ (Authorization sym a :> sublayout) where
25− type JQ' (Authorization sym a :> sublayout) = JQ' sublayout
25+ type JQ (Authorization sym a :> sublayout) = JQ sublayout
2626
2727 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
2828 req & reqHeaders <>~ [ ReplaceHeaderArg "Authorization" $
@@ -35,7 +35,7 @@ data MyLovelyHorse a
3535
3636instance (HasJQ sublayout)
3737 => HasJQ (MyLovelyHorse a :> sublayout) where
38− type JQ' (MyLovelyHorse a :> sublayout) = JQ' sublayout
38+ type JQ (MyLovelyHorse a :> sublayout) = JQ sublayout
3939
4040 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
4141 req & reqHeaders <>~ [ ReplaceHeaderArg "X-MyLovelyHorse" tpl ]
@@ -47,7 +47,7 @@ data WhatsForDinner a
4747
4848instance (HasJQ sublayout)
4949 => HasJQ (WhatsForDinner a :> sublayout) where
50− type JQ' (WhatsForDinner a :> sublayout) = JQ' sublayout
50+ type JQ (WhatsForDinner a :> sublayout) = JQ sublayout
5151
5252 jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $
5353 req & reqHeaders <>~ [ ReplaceHeaderArg "X-WhatsForDinner" tpl ]
servant-lucid/servant-lucid.cabal+1−1
@@ -20,7 +20,7 @@ library
2020 exposed-modules: Servant.HTML.Lucid
2121 -- other-modules:
2222 -- other-extensions:
23− build-depends: base >=4.7 && <4.8
23+ build-depends: base >=4.7 && <5
2424 , http-media
2525 , lucid
2626 , servant
servant-server/src/Servant/Server/Internal/Enter.hs+2−1
@@ -3,7 +3,6 @@
33{-# LANGUAGE FlexibleInstances #-}
44{-# LANGUAGE FunctionalDependencies #-}
55{-# LANGUAGE MultiParamTypeClasses #-}
6−{-# LANGUAGE OverlappingInstances #-}
76{-# LANGUAGE RankNTypes #-}
87{-# LANGUAGE ScopedTypeVariables #-}
98{-# LANGUAGE TypeFamilies #-}
@@ -11,7 +10,9 @@
1110{-# LANGUAGE UndecidableInstances #-}
1211module Servant.Server.Internal.Enter where
1312
13+#if !MIN_VERSION_base(4,8,0)
1414import Control.Applicative
15+#endif
1516import qualified Control.Category as C
1617#if MIN_VERSION_mtl(2,2,1)
1718import Control.Monad.Except
servant/src/Servant/API.hs−1
@@ -54,7 +54,6 @@ module Servant.API (
5454 -- | Type-safe internal URIs
5555 ) where
5656
57−import Data.Proxy (Proxy (..))
5857import Servant.API.Alternative ((:<|>) (..))
5958import Servant.API.Capture (Capture)
6059import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,