Skip to content

Commit 61d0d14

Browse files
committed
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.
1 parent a8f1a76 commit 61d0d14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

servant-server/src/Servant/Server/Internal.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import qualified Data.ByteString as B
4141
import qualified Data.ByteString.Builder as BB
4242
import qualified Data.ByteString.Char8 as BC8
4343
import qualified Data.ByteString.Lazy as BL
44-
import Data.Constraint (Dict(..))
44+
import Data.Constraint (Constraint, Dict(..))
4545
import Data.Either
4646
(partitionEithers)
4747
import 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
822822
instance 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

0 commit comments

Comments
 (0)