Merge pull request #156 from haskell-servant/jkarni/overlappable-alt-doc
Make HasDocs instance for :<|> overlappable.
This commit is contained in:
commit
f7d25c5b35
1 changed files with 5 additions and 1 deletions
|
@ -624,7 +624,11 @@ markdown api = unlines $
|
||||||
|
|
||||||
-- | The generated docs for @a ':<|>' b@ just appends the docs
|
-- | The generated docs for @a ':<|>' b@ just appends the docs
|
||||||
-- for @a@ with the docs for @b@.
|
-- 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
|
=> HasDocs (layout1 :<|> layout2) where
|
||||||
|
|
||||||
docsFor Proxy (ep, action) = docsFor p1 (ep, action) <> docsFor p2 (ep, action)
|
docsFor Proxy (ep, action) = docsFor p1 (ep, action) <> docsFor p2 (ep, action)
|
||||||
|
|
Loading…
Add table
Reference in a new issue