on master help sign in
servant-server: Fix build on GHC 9.2.1

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.

commit61d0d14b5cb01db3d589101b3f17b0178f52e386 authorRenzo Carbonara <gnuk0001@gmail.com> dateFri 4 Feb 2022, 14:34 (5 years ago) parenta8f1a76
1 file changed+2−2
servant-server/src/Servant/Server/Internal.hs+2−2
servant-server/src/Servant/Server/Internal.hs+2−2
@@ -41,7 +41,7 @@ import qualified Data.ByteString as B
4141import qualified Data.ByteString.Builder as BB
4242import qualified Data.ByteString.Char8 as BC8
4343import qualified Data.ByteString.Lazy as BL
44−import Data.Constraint (Dict(..))
44+import Data.Constraint (Constraint, Dict(..))
4545import Data.Either
4646 (partitionEithers)
4747import Data.Maybe
@@ -821,7 +821,7 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
821821-- Erroring instance for 'HasServer' when a combinator is not fully applied
822822instance TypeError (PartialApplication HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
823823 where
824− type ServerT (arr :> sub) _ = TypeError (PartialApplication HasServer arr)
824+ type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
825825 route = error "unreachable"
826826 hoistServerWithContext _ _ _ _ = error "unreachable"
827827