@@ -1,5 +1,6 @@
11{-# LANGUAGE AllowAmbiguousTypes #-}
22{-# LANGUAGE ConstraintKinds #-}
3+{-# LANGUAGE CPP #-}
34{-# LANGUAGE DataKinds #-}
45{-# LANGUAGE DeriveDataTypeable #-}
56{-# LANGUAGE FlexibleContexts #-}
@@ -823,7 +824,11 @@ instance (HasContextEntry context (NamedContext name subContext), HasServer subA
823824-------------------------------------------------------------------------------
824825
825826-- Erroring instance for 'HasServer' when a combinator is not fully applied
826−instance TypeError (PartialApplication @(Type -> [Type] -> Constraint) HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
827+instance TypeError (PartialApplication
828+#if __GLASGOW_HASKELL__ >= 904
829+ @(Type -> [Type] -> Constraint)
830+#endif
831+ HasServer arr) => HasServer ((arr :: a -> b) :> sub) context
827832 where
828833 type ServerT (arr :> sub) _ = TypeError (PartialApplication (HasServer :: * -> [*] -> Constraint) arr)
829834 route = error "unreachable"
@@ -867,7 +872,11 @@ type HasServerArrowTypeError a b =
867872-- XXX: This omits the @context@ parameter, e.g.:
868873--
869874-- "There is no instance for HasServer (Bool :> …)". Do we care ?
870−instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub @(Type -> [Type] -> Constraint) HasServer ty) => HasServer (ty :> sub) context
875+instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub
876+#if __GLASGOW_HASKELL__ >= 904
877+ @(Type -> [Type] -> Constraint)
878+#endif
879+ HasServer ty) => HasServer (ty :> sub) context
871880
872881instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context
873882