git.iko.soy/typeable/servant
on master help sign in
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.

commit8dc6d9a7d4527bc69f76239d5c1f06764941164e authorPhilipp Kant <philipp@infinipool.com> dateTue 16 Jun 2015, 10:53 (11 years ago) parent56b91b1
1 file changed+1−1
servant-docs/src/Servant/Docs/Internal.hs+1−1
servant-docs/src/Servant/Docs/Internal.hs+1−1
@@ -338,7 +338,7 @@ extraInfo p action =
338338docsWith :: HasDocs layout => [DocIntro] -> ExtraInfo layout -> Proxy layout -> API
339339docsWith intros (ExtraInfo endpoints) p =
340340 docs p & apiIntros <>~ intros
341− & apiEndpoints %~ HM.unionWith combineAction endpoints
341+ & apiEndpoints %~ HM.unionWith (flip combineAction) endpoints
342342
343343
344344-- | Generate the docs for a given API that implements 'HasDocs' with with any