Commit 0031ec0b authored by Ryan Scott's avatar Ryan Scott
Browse files

Remove unneeded servant, servant-server patches

The latest Hackage versions now compile with HEAD.
parent 7fb7dcdb
......@@ -103,7 +103,7 @@ extra_package scotty
extra_package generic-lens
extra_package microstache
extra_package singletons-base 3.1
extra_package servant 0.19
extra_package servant
extra_package hgmp
extra_package Agda
extra_package mmark
......
diff --git a/servant.cabal b/servant.cabal
index 314b784..e4068ac 100644
--- a/servant.cabal
+++ b/servant.cabal
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: servant
version: 0.19
+x-revision: 4
synopsis: A family of combinators for defining webservices APIs
category: Servant, Web
@@ -80,13 +81,13 @@ library
--
-- note: mtl lower bound is so low because of GHC-7.8
build-depends:
- base >= 4.9 && < 4.16
+ base >= 4.9 && < 4.17
, bytestring >= 0.10.8.1 && < 0.12
, constraints >= 0.2
, mtl >= 2.2.2 && < 2.3
, sop-core >= 0.4.0.0 && < 0.6
, transformers >= 0.5.2.0 && < 0.6
- , text >= 1.2.3.0 && < 1.3
+ , text >= 1.2.3.0 && < 2.1
-- We depend (heavily) on the API of these packages:
@@ -98,7 +99,7 @@ library
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.
-- Here can be exceptions if we really need features from the newer versions.
build-depends:
- base-compat >= 0.10.5 && < 0.12
+ base-compat >= 0.10.5 && < 0.13
, aeson >= 1.4.1.0 && < 3
, attoparsec >= 0.13.2.2 && < 0.15
, bifunctors >= 5.5.3 && < 5.6
@@ -106,7 +107,7 @@ library
, deepseq >= 1.4.2.0 && < 1.5
, http-media >= 0.7.1.3 && < 0.9
, http-types >= 0.12.2 && < 0.13
- , mmorph >= 1.1.2 && < 1.2
+ , mmorph >= 1.1.2 && < 1.3
, network-uri >= 2.6.1.0 && < 2.7
, QuickCheck >= 2.12.6.1 && < 2.15
, string-conversions >= 0.4.0.1 && < 0.5
@@ -166,9 +167,9 @@ test-suite spec
-- Additional dependencies
build-depends:
- hspec >= 2.6.0 && < 2.9
+ hspec >= 2.6.0 && < 2.10
, QuickCheck >= 2.12.6.1 && < 2.15
, quickcheck-instances >= 0.3.19 && < 0.4
build-tool-depends:
- hspec-discover:hspec-discover >= 2.6.0 && < 2.9
+ hspec-discover:hspec-discover >= 2.6.0 && < 2.10
diff --git a/src/Servant/Links.hs b/src/Servant/Links.hs
index ce07e22..67ba9c0 100644
--- a/src/Servant/Links.hs
+++ b/src/Servant/Links.hs
@@ -129,6 +129,7 @@ module Servant.Links (
, linkFragment
) where
+import Data.Kind (Type)
import Data.List
import Data.Constraint
import Data.Proxy
@@ -647,12 +648,12 @@ simpleToLink _ toA _ = toLink toA (Proxy :: Proxy sub)
-- >>> import Data.Text (Text)
-- Erroring instance for 'HasLink' when a combinator is not fully applied
-instance TypeError (PartialApplication HasLink arr) => HasLink ((arr :: a -> b) :> sub)
+instance TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) => HasLink ((arr :: a -> b) :> sub)
where
type MkLink (arr :> sub) _ = TypeError (PartialApplication (HasLink :: * -> Constraint) arr)
toLink = error "unreachable"
-- Erroring instances for 'HasLink' for unknown API combinators
-instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasLink ty) => HasLink (ty :> sub)
+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) => HasLink (ty :> sub)
instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasLink api)) => HasLink api
diff --git a/servant-server.cabal b/servant-server.cabal
index c5e2f50..c93491f 100644
--- a/servant-server.cabal
+++ b/servant-server.cabal
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: servant-server
version: 0.19.1
+x-revision: 2
synopsis: A family of combinators for defining webservices APIs and serving them
category: Servant, Web
@@ -72,7 +73,7 @@ library
-- Servant dependencies
-- strict dependency as we re-export 'servant' things.
build-depends:
- servant >= 0.19
+ servant >= 0.19 && < 0.20
, http-api-data >= 0.4.1 && < 0.4.4
-- Other dependencies: Lower bound around what is in the latest Stackage LTS.
@@ -159,7 +160,7 @@ test-suite spec
build-depends:
aeson >= 1.4.1.0 && < 3
, directory >= 1.3.0.0 && < 1.4
- , hspec >= 2.6.0 && < 2.9
+ , hspec >= 2.6.0 && < 2.10
, hspec-wai >= 0.10.1 && < 0.12
, QuickCheck >= 2.12.6.1 && < 2.15
, should-not-typecheck >= 2.1.0 && < 2.2
@@ -167,4 +168,4 @@ test-suite spec
, wai-extra >= 3.0.24.3 && < 3.2
build-tool-depends:
- hspec-discover:hspec-discover >= 2.6.0 && <2.9
+ hspec-discover:hspec-discover >= 2.6.0 && <2.10
diff --git a/src/Servant/Server/Internal.hs b/src/Servant/Server/Internal.hs
index e2df2c4..025cd5f 100644
--- a/src/Servant/Server/Internal.hs
+++ b/src/Servant/Server/Internal.hs
@@ -44,6 +44,7 @@ import qualified Data.ByteString.Lazy as BL
import Data.Constraint (Constraint, Dict(..))
import Data.Either
(partitionEithers)
+import Data.Kind (Type)
import Data.Maybe
(fromMaybe, isNothing, mapMaybe, maybeToList)
import Data.String
@@ -819,7 +820,7 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
-------------------------------------------------------------------------------
-- Erroring instance for 'HasServer' when a combinator is not fully applied
-instance TypeError (PartialApplication HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
+instance TypeError (PartialApplication (HasServer :: Type -> [Type] -> Constraint) arr) => HasServer ((arr :: a -> b) :> sub) context
where
type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
route = error "unreachable"
@@ -863,7 +864,7 @@ type HasServerArrowTypeError a b =
-- XXX: This omits the @context@ parameter, e.g.:
--
-- "There is no instance for HasServer (Bool :> …)". Do we care ?
-instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasServer ty) => HasServer (ty :> sub) context
+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub (HasServer :: Type -> [Type] -> Constraint) ty) => HasServer (ty :> sub) context
instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment