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.

commit3565641359a1ce6d5cdcb048af07d503281a7a1b authorPhilipp Kant <philipp@infinipool.com> dateTue 16 Jun 2015, 10:53 (11 years ago) parent452ddf0
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