From 8dc6d9a7d4527bc69f76239d5c1f06764941164e Mon Sep 17 00:00:00 2001 From: Philipp Kant Date: Tue, 16 Jun 2015 10:53:13 +0200 Subject: [PATCH] servant-docs: Fix docsWith. When adding extra info using using docsWith, the responses vanished from the output. This was due to combineAction being left-biased, and docsWith combining the extra info with the enpoint (in that order). Flipping combineAction solves this. --- servant-docs/src/Servant/Docs/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index c1e5b724..09bf8b40 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -338,7 +338,7 @@ extraInfo p action = docsWith :: HasDocs layout => [DocIntro] -> ExtraInfo layout -> Proxy layout -> API docsWith intros (ExtraInfo endpoints) p = docs p & apiIntros <>~ intros - & apiEndpoints %~ HM.unionWith combineAction endpoints + & apiEndpoints %~ HM.unionWith (flip combineAction) endpoints -- | Generate the docs for a given API that implements 'HasDocs' with with any