From 61d0d14b5cb01db3d589101b3f17b0178f52e386 Mon Sep 17 00:00:00 2001 From: Renzo Carbonara Date: Fri, 4 Feb 2022 14:34:12 +0200 Subject: [PATCH] servant-server: Fix build on GHC 9.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue is similar to the one in #1513: ``` src/Servant/Server/Internal.hs:824:10: error: • Uninferrable type variable k0 in type family equation right-hand side: (TypeError ...) • In the type instance declaration for ‘ServerT’ In the instance declaration for ‘HasServer ((arr :: a -> b) :> sub) context’ | 824 | type ServerT (arr :> sub) _ = TypeError (PartialApplication HasServer arr) | ``` This fix is similar to the one in #1514. --- servant-server/src/Servant/Server/Internal.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index bb35b9c8..e2df2c4a 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -41,7 +41,7 @@ import qualified Data.ByteString as B import qualified Data.ByteString.Builder as BB import qualified Data.ByteString.Char8 as BC8 import qualified Data.ByteString.Lazy as BL -import Data.Constraint (Dict(..)) +import Data.Constraint (Constraint, Dict(..)) import Data.Either (partitionEithers) import Data.Maybe @@ -821,7 +821,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 where - type ServerT (arr :> sub) _ = TypeError (PartialApplication HasServer arr) + type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr) route = error "unreachable" hoistServerWithContext _ _ _ _ = error "unreachable"