diff --git a/servant-client/src/Servant/Client.hs b/servant-client/src/Servant/Client.hs index e09b138d..67b6c8de 100644 --- a/servant-client/src/Servant/Client.hs +++ b/servant-client/src/Servant/Client.hs @@ -16,7 +16,6 @@ module Servant.Client ( client , HasClient(..) - , Client , ServantError(..) , module Servant.Common.BaseUrl ) where diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index 88f512d8..35671592 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -660,7 +660,11 @@ instance HasDocs Delete where action' = action & response.respBody .~ [] & response.respStatus .~ 204 -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPABLe #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) => HasDocs (Get cts a) where docsFor Proxy (endpoint, action) = single endpoint' action' @@ -671,7 +675,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) t = Proxy :: Proxy cts p = Proxy :: Proxy a -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPING #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts , AllHeaderSamples ls , GetHeaders (HList ls) ) => HasDocs (Get cts (Headers ls a)) where docsFor Proxy (endpoint, action) = @@ -694,7 +702,11 @@ instance (KnownSymbol sym, HasDocs sublayout) action' = over headers (|> headername) action headername = pack $ symbolVal (Proxy :: Proxy sym) -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPABLE #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) => HasDocs (Post cts a) where docsFor Proxy (endpoint, action) = single endpoint' action' @@ -706,7 +718,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) t = Proxy :: Proxy cts p = Proxy :: Proxy a -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPING #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts , AllHeaderSamples ls , GetHeaders (HList ls) ) => HasDocs (Post cts (Headers ls a)) where docsFor Proxy (endpoint, action) = @@ -721,7 +737,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts t = Proxy :: Proxy cts p = Proxy :: Proxy a -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPABLE #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) => HasDocs (Put cts a) where docsFor Proxy (endpoint, action) = single endpoint' action' @@ -733,7 +753,11 @@ instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts) t = Proxy :: Proxy cts p = Proxy :: Proxy a -instance (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPING #-} +#endif + (ToSample a b, IsNonEmpty cts, AllMimeRender cts b, SupportedTypes cts , AllHeaderSamples ls , GetHeaders (HList ls) ) => HasDocs (Put cts (Headers ls a)) where docsFor Proxy (endpoint, action) = diff --git a/servant-examples/auth-combinator/auth-combinator.hs b/servant-examples/auth-combinator/auth-combinator.hs index 3277c97e..c6373fe1 100644 --- a/servant-examples/auth-combinator/auth-combinator.hs +++ b/servant-examples/auth-combinator/auth-combinator.hs @@ -26,7 +26,7 @@ isGoodCookie = return . (== "good password") data AuthProtected instance HasServer rest => HasServer (AuthProtected :> rest) where - type ServerT' (AuthProtected :> rest) m = ServerT' rest m + type ServerT (AuthProtected :> rest) m = ServerT rest m route Proxy a request respond = case lookup "Cookie" (requestHeaders request) of @@ -75,4 +75,4 @@ $ curl -H "Cookie: good password" http://localhost:8080/private [{"ssshhh":"this is a secret"}] $ curl -H "Cookie: bad password" http://localhost:8080/private Invalid cookie. --} \ No newline at end of file +-} diff --git a/servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs b/servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs index 95cf4487..4480d44c 100644 --- a/servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs +++ b/servant-jquery/test/Servant/JQuerySpec/CustomHeaders.hs @@ -22,7 +22,7 @@ data Authorization (sym :: Symbol) a instance (KnownSymbol sym, HasJQ sublayout) => HasJQ (Authorization sym a :> sublayout) where - type JQ' (Authorization sym a :> sublayout) = JQ' sublayout + type JQ (Authorization sym a :> sublayout) = JQ sublayout jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $ req & reqHeaders <>~ [ ReplaceHeaderArg "Authorization" $ @@ -35,7 +35,7 @@ data MyLovelyHorse a instance (HasJQ sublayout) => HasJQ (MyLovelyHorse a :> sublayout) where - type JQ' (MyLovelyHorse a :> sublayout) = JQ' sublayout + type JQ (MyLovelyHorse a :> sublayout) = JQ sublayout jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $ req & reqHeaders <>~ [ ReplaceHeaderArg "X-MyLovelyHorse" tpl ] @@ -47,7 +47,7 @@ data WhatsForDinner a instance (HasJQ sublayout) => HasJQ (WhatsForDinner a :> sublayout) where - type JQ' (WhatsForDinner a :> sublayout) = JQ' sublayout + type JQ (WhatsForDinner a :> sublayout) = JQ sublayout jqueryFor Proxy req = jqueryFor (Proxy :: Proxy sublayout) $ req & reqHeaders <>~ [ ReplaceHeaderArg "X-WhatsForDinner" tpl ] diff --git a/servant-lucid/servant-lucid.cabal b/servant-lucid/servant-lucid.cabal index b2d02316..7088003d 100644 --- a/servant-lucid/servant-lucid.cabal +++ b/servant-lucid/servant-lucid.cabal @@ -20,7 +20,7 @@ library exposed-modules: Servant.HTML.Lucid -- other-modules: -- other-extensions: - build-depends: base >=4.7 && <4.8 + build-depends: base >=4.7 && <5 , http-media , lucid , servant diff --git a/servant-server/src/Servant/Server/Internal/Enter.hs b/servant-server/src/Servant/Server/Internal/Enter.hs index e408087a..a8a904d6 100644 --- a/servant-server/src/Servant/Server/Internal/Enter.hs +++ b/servant-server/src/Servant/Server/Internal/Enter.hs @@ -3,7 +3,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} @@ -11,7 +10,9 @@ {-# LANGUAGE UndecidableInstances #-} module Servant.Server.Internal.Enter where +#if !MIN_VERSION_base(4,8,0) import Control.Applicative +#endif import qualified Control.Category as C #if MIN_VERSION_mtl(2,2,1) import Control.Monad.Except diff --git a/servant/src/Servant/API.hs b/servant/src/Servant/API.hs index a7912564..034be7a2 100644 --- a/servant/src/Servant/API.hs +++ b/servant/src/Servant/API.hs @@ -54,7 +54,6 @@ module Servant.API ( -- | Type-safe internal URIs ) where -import Data.Proxy (Proxy (..)) import Servant.API.Alternative ((:<|>) (..)) import Servant.API.Capture (Capture) import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,