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.
This commit is contained in:
Philipp Kant 2015-06-16 10:53:13 +02:00 committed by Christian Marie
parent 452ddf02e4
commit 3565641359

View File

@ -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