diff --git a/patches/servant-0.19.patch b/patches/servant-0.19.patch index 9cfb1bdb9330aac13652341451ee8b4a6ffbbc3f..b30c08b4389211d1d8a1b7ecf9e8bf3c9a18e956 100644 --- a/patches/servant-0.19.patch +++ b/patches/servant-0.19.patch @@ -1,16 +1,23 @@ diff --git a/servant.cabal b/servant.cabal -index 314b784..c3bbfe1 100644 +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: 1 ++x-revision: 4 synopsis: A family of combinators for defining webservices APIs category: Servant, Web -@@ -86,7 +87,7 @@ library +@@ -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 @@ -28,6 +35,27 @@ index 314b784..c3bbfe1 100644 , 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 diff --git a/patches/servant-server-0.19.1.patch b/patches/servant-server-0.19.1.patch new file mode 100644 index 0000000000000000000000000000000000000000..939344cbdb17a4c5d65636e99c3888b3cf6ed2b5 --- /dev/null +++ b/patches/servant-server-0.19.1.patch @@ -0,0 +1,66 @@ +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 +