From e29acc0825a6199b3a61a383d8e4cf4b99140646 Mon Sep 17 00:00:00 2001 From: "Julian K. Arni" Date: Tue, 14 Jul 2015 15:57:36 +0200 Subject: [PATCH] Make HasDocs instance for :<|> overlappable. That way it's easier to document that the endpoints on the LHS "fall through" to the RHS. --- servant-docs/src/Servant/Docs/Internal.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index 5b590752..e4dcbd60 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -624,7 +624,11 @@ markdown api = unlines $ -- | The generated docs for @a ':<|>' b@ just appends the docs -- for @a@ with the docs for @b@. -instance (HasDocs layout1, HasDocs layout2) +instance +#if MIN_VERSION_base(4,8,0) + {-# OVERLAPPABLE #-} +#endif + (HasDocs layout1, HasDocs layout2) => HasDocs (layout1 :<|> layout2) where docsFor Proxy (ep, action) = docsFor p1 (ep, action) <> docsFor p2 (ep, action)