From 75cb9ac24604182a5fa917307d86e6843108f4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Deest?= Date: Thu, 18 Nov 2021 13:50:21 +0100 Subject: [PATCH] Add comment about slightly incorrect error message --- servant-server/src/Servant/Server/Internal.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servant-server/src/Servant/Server/Internal.hs b/servant-server/src/Servant/Server/Internal.hs index 164c1f77..bb35b9c8 100644 --- a/servant-server/src/Servant/Server/Internal.hs +++ b/servant-server/src/Servant/Server/Internal.hs @@ -859,6 +859,10 @@ type HasServerArrowTypeError a b = ':$$: 'ShowType b -- Erroring instances for 'HasServer' for unknown API combinators + +-- XXX: This omits the @context@ parameter, e.g.: +-- +-- "There is no instance for HasServer (Bool :> …)". Do we care ? instance {-# OVERLAPPABLE #-} TypeError (NoInstanceForSub HasServer ty) => HasServer (ty :> sub) context instance {-# OVERLAPPABLE #-} TypeError (NoInstanceFor (HasServer api context)) => HasServer api context