@@ -94,6 +94,8 @@ import Servant.API.TypeErrors
9494import Web.HttpApiData
9595 (FromHttpApiData, parseHeader, parseQueryParam, parseUrlPiece,
9696 parseUrlPieces)
97+import Data.Kind
98+ (Type)
9799
98100import Servant.Server.Internal.BasicAuth
99101import Servant.Server.Internal.Context
@@ -821,7 +823,7 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
821823-------------------------------------------------------------------------------
822824
823825-- Erroring instance for 'HasServer' when a combinator is not fully applied
824−instance TypeError (PartialApplication HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
826+instance TypeError (PartialApplication @(Type -> [Type] -> Constraint) HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
825827 where
826828 type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
827829 route = error "unreachable"
@@ -865,7 +867,7 @@ type HasServerArrowTypeError a b =
865867-- XXX: This omits the @context@ parameter, e.g.:
866868--
867869-- "There is no instance for HasServer (Bool :> …)". Do we care ?
868−instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasServer ty) => HasServer (ty :> sub) context
870+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub @(Type -> [Type] -> Constraint) HasServer ty) => HasServer (ty :> sub) context
869871
870872instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context
871873