From 4627683a647395f44443fa66d7e92a79eb98cab8 Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Tue, 9 Aug 2022 11:05:00 +0100 Subject: [PATCH 1/7] Fix TypeError for GHC-9.4 In GHC-9.4 the typechecker changed requiring more annotations in positions like this. See https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.4#ambiguous-types-containing-a-typeerror and https://gitlab.haskell.org/ghc/ghc/-/issues/21149 --- servant-server/src/Servant/Server/Internal.hs | 6 ++++-- servant/src/Servant/Links.hs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index a2b4f033..77978d64 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -94,6 +94,8 @@ import Servant.API.TypeErrors import Web.HttpApiData (FromHttpApiData, parseHeader, parseQueryParam, parseUrlPiece, parseUrlPieces) +import Data.Kind + (Type) import Servant.Server.Internal.BasicAuth import Servant.Server.Internal.Context @@ -821,7 +823,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 @(Type -> [Type] -> Constraint) HasServer arr) => HasServer ((arr :: a -> b) :> sub) context where type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr) route = error "unreachable" @@ -865,7 +867,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 @(Type -> [Type] -> Constraint) HasServer ty) => HasServer (ty :> sub) context instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context diff --git a/servant/src/Servant/Links.hs b/servant/src/Servant/Links.hs index ce07e22d..9074429b 100644 --- a/servant/src/Servant/Links.hs +++ b/servant/src/Servant/Links.hs @@ -193,6 +193,8 @@ import Servant.API.Verbs import Servant.API.WithNamedContext (WithNamedContext) import Web.HttpApiData +import Data.Kind + (Type) -- | A safe link datatype. -- The only way of constructing a 'Link' is using 'safeLink', which means any @@ -647,12 +649,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 @(Type -> Constraint) HasLink 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 @(Type -> Constraint) HasLink ty) => HasLink (ty :> sub) instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasLink api)) => HasLink api From 52f76ea722fc39743535b0f15f40654abe841555 Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Tue, 9 Aug 2022 11:11:16 +0100 Subject: [PATCH 2/7] Add GHC-9.4 to workflow --- .github/workflows/master.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 2ce0a91c..e155a0f4 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -20,6 +20,7 @@ jobs: - "8.10.7" - "9.0.2" - "9.2.2" + - "9.4.2" steps: - uses: actions/checkout@v2 From a445fbafd6b02eaae589e2e18879070c79131d7b Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Tue, 18 Oct 2022 11:06:34 +0100 Subject: [PATCH 3/7] Use CPP to avoid errors with old GHC from TypeApplications in class instance --- servant-server/src/Servant/Server/Internal.hs | 13 +++++++++++-- servant/src/Servant/Links.hs | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index 77978d64..a4d74564 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -1,5 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} @@ -823,7 +824,11 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA ------------------------------------------------------------------------------- -- Erroring instance for 'HasServer' when a combinator is not fully applied -instance TypeError (PartialApplication @(Type -> [Type] -> Constraint) HasServer arr) => HasServer ((arr :: a -> b) :> sub) context +instance TypeError (PartialApplication +#if __GLASGOW_HASKELL__ >= 904 + @(Type -> [Type] -> Constraint) +#endif + HasServer arr) => HasServer ((arr :: a -> b) :> sub) context where type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr) route = error "unreachable" @@ -867,7 +872,11 @@ 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 @(Type -> [Type] -> Constraint) HasServer ty) => HasServer (ty :> sub) context +instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub +#if __GLASGOW_HASKELL__ >= 904 + @(Type -> [Type] -> Constraint) +#endif + HasServer ty) => HasServer (ty :> sub) context instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context diff --git a/servant/src/Servant/Links.hs b/servant/src/Servant/Links.hs index 9074429b..44e9987f 100644 --- a/servant/src/Servant/Links.hs +++ b/servant/src/Servant/Links.hs @@ -1,5 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -649,12 +650,20 @@ 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 @(Type -> Constraint) HasLink arr) => HasLink ((arr :: a -> b) :> sub) +instance TypeError (PartialApplication +#if __GLASGOW_HASKELL__ >= 904 + @(Type -> Constraint) +#endif + HasLink 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 @(Type -> Constraint) HasLink ty) => HasLink (ty :> sub) +instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub +#if __GLASGOW_HASKELL__ >= 904 + @(Type -> Constraint) +#endif + HasLink ty) => HasLink (ty :> sub) instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasLink api)) => HasLink api From 53c132173c2876d9a0f70bdc795460bb993b0896 Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Wed, 24 Aug 2022 00:15:16 +0100 Subject: [PATCH 4/7] Bump http-api-data bounds --- servant-server/servant-server.cabal | 2 +- servant/servant.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index f354a1e8..6467717e 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -73,7 +73,7 @@ library -- strict dependency as we re-export 'servant' things. build-depends: servant >= 0.19 && < 0.20 - , http-api-data >= 0.4.1 && < 0.4.4 + , http-api-data >= 0.4.1 && < 0.5.1 -- 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. diff --git a/servant/servant.cabal b/servant/servant.cabal index 32b63feb..948eb4da 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -92,7 +92,7 @@ library -- We depend (heavily) on the API of these packages: -- i.e. re-export, or allow using without direct dependency build-depends: - http-api-data >= 0.4.1 && < 0.4.4 + http-api-data >= 0.4.1 && < 0.5.1 , singleton-bool >= 0.1.4 && < 0.1.7 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. From 3f6886ad2df62d05d11409d076baad947621fab4 Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Wed, 17 Aug 2022 11:37:27 +0100 Subject: [PATCH 5/7] Bump depedency bounds --- servant-auth/servant-auth-client/servant-auth-client.cabal | 2 +- servant-auth/servant-auth-docs/servant-auth-docs.cabal | 4 ++-- servant-auth/servant-auth-server/servant-auth-server.cabal | 6 +++--- .../servant-auth-swagger/servant-auth-swagger.cabal | 2 +- servant-auth/servant-auth/servant-auth.cabal | 2 +- servant-client-core/servant-client-core.cabal | 4 ++-- servant-client/servant-client.cabal | 4 ++-- servant-docs/servant-docs.cabal | 2 +- servant-foreign/servant-foreign.cabal | 2 +- servant-http-streams/servant-http-streams.cabal | 4 ++-- servant-server/servant-server.cabal | 2 +- servant/servant.cabal | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/servant-auth/servant-auth-client/servant-auth-client.cabal b/servant-auth/servant-auth-client/servant-auth-client.cabal index 621bf832..02092fec 100644 --- a/servant-auth/servant-auth-client/servant-auth-client.cabal +++ b/servant-auth/servant-auth-client/servant-auth-client.cabal @@ -31,7 +31,7 @@ library default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators ghc-options: -Wall build-depends: - base >= 4.10 && < 4.17 + base >= 4.10 && < 4.18 , bytestring >= 0.10.6.0 && < 0.12 , containers >= 0.5.6.2 && < 0.7 , servant-auth == 0.4.* diff --git a/servant-auth/servant-auth-docs/servant-auth-docs.cabal b/servant-auth/servant-auth-docs/servant-auth-docs.cabal index 802b587f..f2bdeb8b 100644 --- a/servant-auth/servant-auth-docs/servant-auth-docs.cabal +++ b/servant-auth/servant-auth-docs/servant-auth-docs.cabal @@ -35,7 +35,7 @@ library default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators ghc-options: -Wall build-depends: - base >= 4.10 && < 4.17 + base >= 4.10 && < 4.18 , servant-docs >= 0.11.2 && < 0.13 , servant >= 0.13 && < 0.20 , servant-auth == 0.4.* @@ -50,7 +50,7 @@ test-suite doctests build-depends: base, servant-auth-docs, - doctest >= 0.16 && < 0.19, + doctest >= 0.16 && < 0.21, QuickCheck >= 2.11.3 && < 2.15, template-haskell ghc-options: -Wall -threaded diff --git a/servant-auth/servant-auth-server/servant-auth-server.cabal b/servant-auth/servant-auth-server/servant-auth-server.cabal index d45fd769..00535d30 100644 --- a/servant-auth/servant-auth-server/servant-auth-server.cabal +++ b/servant-auth/servant-auth-server/servant-auth-server.cabal @@ -31,7 +31,7 @@ library default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators ghc-options: -Wall build-depends: - base >= 4.10 && < 4.17 + base >= 4.10 && < 4.18 , aeson >= 1.0.0.1 && < 3 , base64-bytestring >= 1.0.0.1 && < 2 , blaze-builder >= 0.4.1.0 && < 0.5 @@ -43,7 +43,7 @@ library , http-types >= 0.12.2 && < 0.13 , jose >= 0.7.0.0 && < 0.10 , lens >= 4.16.1 && < 5.3 - , memory >= 0.14.16 && < 0.18 + , memory >= 0.14.16 && < 0.19 , monad-time >= 0.3.1.0 && < 0.4 , mtl >= 2.2.2 && < 2.3 , servant >= 0.13 && < 0.20 @@ -51,7 +51,7 @@ library , servant-server >= 0.13 && < 0.20 , tagged >= 0.8.4 && < 0.9 , text >= 1.2.3.0 && < 2.1 - , time >= 1.5.0.1 && < 1.12 + , time >= 1.5.0.1 && < 1.13 , unordered-containers >= 0.2.9.0 && < 0.3 , wai >= 3.2.1.2 && < 3.3 diff --git a/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal b/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal index fae37e83..f02f3c77 100644 --- a/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal +++ b/servant-auth/servant-auth-swagger/servant-auth-swagger.cabal @@ -31,7 +31,7 @@ library default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators ghc-options: -Wall build-depends: - base >= 4.10 && < 4.17 + base >= 4.10 && < 4.18 , text >= 1.2.3.0 && < 2.1 , servant-swagger >= 1.1.5 && < 2 , swagger2 >= 2.2.2 && < 3 diff --git a/servant-auth/servant-auth/servant-auth.cabal b/servant-auth/servant-auth/servant-auth.cabal index 5f7d8810..79c8a396 100644 --- a/servant-auth/servant-auth/servant-auth.cabal +++ b/servant-auth/servant-auth/servant-auth.cabal @@ -33,7 +33,7 @@ library default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators ghc-options: -Wall build-depends: - base >= 4.10 && < 4.17 + base >= 4.10 && < 4.18 , containers >= 0.6 && < 0.7 , aeson >= 1.3.1.1 && < 3 , jose >= 0.7.0.0 && < 0.10 diff --git a/servant-client-core/servant-client-core.cabal b/servant-client-core/servant-client-core.cabal index 34af6889..9994832d 100644 --- a/servant-client-core/servant-client-core.cabal +++ b/servant-client-core/servant-client-core.cabal @@ -50,14 +50,14 @@ library -- -- note: mtl lower bound is so low because of GHC-7.8 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , constraints >= 0.2 && < 0.14 , containers >= 0.5.7.1 && < 0.7 , deepseq >= 1.4.2.0 && < 1.5 , text >= 1.2.3.0 && < 2.1 , transformers >= 0.5.2.0 && < 0.6 - , template-haskell >= 2.11.1.0 && < 2.19 + , template-haskell >= 2.11.1.0 && < 2.20 if !impl(ghc >= 8.2) build-depends: diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index ae628b38..8c0b51fe 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -41,14 +41,14 @@ library -- Bundled with GHC: Lower bound to not force re-installs -- text and mtl are bundled starting with GHC-8.4 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , containers >= 0.5.7.1 && < 0.7 , deepseq >= 1.4.2.0 && < 1.5 , mtl >= 2.2.2 && < 2.3 , stm >= 2.4.5.1 && < 2.6 , text >= 1.2.3.0 && < 2.1 - , time >= 1.6.0.1 && < 1.12 + , time >= 1.6.0.1 && < 1.13 , transformers >= 0.5.2.0 && < 0.6 if !impl(ghc >= 8.2) diff --git a/servant-docs/servant-docs.cabal b/servant-docs/servant-docs.cabal index 52c8f084..59612621 100644 --- a/servant-docs/servant-docs.cabal +++ b/servant-docs/servant-docs.cabal @@ -41,7 +41,7 @@ library -- -- note: mtl lower bound is so low because of GHC-7.8 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , text >= 1.2.3.0 && < 2.1 diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 99f6c5a5..6cb4ba82 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -41,7 +41,7 @@ library -- -- note: mtl lower bound is so low because of GHC-7.8 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , text >= 1.2.3.0 && < 2.1 -- Servant dependencies diff --git a/servant-http-streams/servant-http-streams.cabal b/servant-http-streams/servant-http-streams.cabal index 1282da1f..9ba10121 100644 --- a/servant-http-streams/servant-http-streams.cabal +++ b/servant-http-streams/servant-http-streams.cabal @@ -38,13 +38,13 @@ library -- Bundled with GHC: Lower bound to not force re-installs -- text and mtl are bundled starting with GHC-8.4 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , containers >= 0.5.7.1 && < 0.7 , deepseq >= 1.4.2.0 && < 1.5 , mtl >= 2.2.2 && < 2.3 , text >= 1.2.3.0 && < 2.1 - , time >= 1.6.0.1 && < 1.12 + , time >= 1.6.0.1 && < 1.13 , transformers >= 0.5.2.0 && < 0.6 if !impl(ghc >= 8.2) diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 6467717e..5d5bfb76 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -60,7 +60,7 @@ library -- Bundled with GHC: Lower bound to not force re-installs -- text and mtl are bundled starting with GHC-8.4 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , constraints >= 0.2 && < 0.14 , containers >= 0.5.7.1 && < 0.7 diff --git a/servant/servant.cabal b/servant/servant.cabal index 948eb4da..6ea613ab 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -80,7 +80,7 @@ library -- -- note: mtl lower bound is so low because of GHC-7.8 build-depends: - base >= 4.9 && < 4.17 + base >= 4.9 && < 4.18 , bytestring >= 0.10.8.1 && < 0.12 , constraints >= 0.2 , mtl >= 2.2.2 && < 2.3 From 86c61c6dbdc82ffcab5803e15411f7fce82874b1 Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Thu, 27 Oct 2022 13:03:50 +0100 Subject: [PATCH 6/7] Update doctest to be compatible with newer GHC --- servant/src/Servant/API/TypeLevel.hs | 6 +++--- servant/src/Servant/Links.hs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/servant/src/Servant/API/TypeLevel.hs b/servant/src/Servant/API/TypeLevel.hs index 4a5e3c3b..3a368907 100644 --- a/servant/src/Servant/API/TypeLevel.hs +++ b/servant/src/Servant/API/TypeLevel.hs @@ -110,7 +110,7 @@ type family IsElem' a s :: Constraint -- -- >>> ok (Proxy :: Proxy (IsElem ("bye" :> Get '[JSON] Int) SampleAPI)) -- ... --- ... Could not deduce... +-- ... Could not ... -- ... -- -- An endpoint is considered within an api even if it is missing combinators @@ -151,7 +151,7 @@ type family IsElem endpoint api :: Constraint where -- -- >>> ok (Proxy :: Proxy (IsSubAPI (SampleAPI :<|> Get '[JSON] Int) SampleAPI)) -- ... --- ... Could not deduce... +-- ... Could not ... -- ... -- -- This uses @IsElem@ for checking; thus the note there applies here. @@ -174,7 +174,7 @@ type family AllIsElem xs api :: Constraint where -- -- >>> ok (Proxy :: Proxy (IsIn (Get '[JSON] Int) (Header "h" Bool :> Get '[JSON] Int))) -- ... --- ... Could not deduce... +-- ... Could not ... -- ... type family IsIn (endpoint :: *) (api :: *) :: Constraint where IsIn e (sa :<|> sb) = Or (IsIn e sa) (IsIn e sb) diff --git a/servant/src/Servant/Links.hs b/servant/src/Servant/Links.hs index 44e9987f..74314e0a 100644 --- a/servant/src/Servant/Links.hs +++ b/servant/src/Servant/Links.hs @@ -92,7 +92,7 @@ -- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] NoContent) -- >>> safeLink api bad_link -- ... --- ...Could not deduce... +-- ...Could not ... -- ... -- -- This error is essentially saying that the type family couldn't find From ff135e868bc98e3cf73a22c0af5b4d369a8f45fb Mon Sep 17 00:00:00 2001 From: Teo Camarasu Date: Tue, 9 Aug 2022 11:06:20 +0100 Subject: [PATCH 7/7] Add flags to cabal.project to allow building with GHC-9.4 --- cabal.project | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cabal.project b/cabal.project index 42e8057b..3a3bea24 100644 --- a/cabal.project +++ b/cabal.project @@ -51,3 +51,8 @@ packages: tests: True optimization: False -- reorder-goals: True + +allow-newer: +-- see https://github.com/haskellari/postgresql-simple/issues/104 + postgresql-simple:base + , postgresql-simple:template-haskell