on master help sign in
Improve formatting of haddock
commitdc4b4be42ea851d29be62ece4bfbd1b6210fad08 authorOleg Grenrus <oleg.grenrus@iki.fi> dateThu 19 Jan 2017, 19:04 (10 years ago) parent22b4d13
2 files changed+5−1
servant/src/Servant/API/Alternative.hs+4 servant/src/Servant/Utils/Links.hs+1−1
servant/src/Servant/API/Alternative.hs+4
@@ -7,6 +7,7 @@
77{-# OPTIONS_HADDOCK not-home #-}
88module Servant.API.Alternative ((:<|>)(..)) where
99
10+import Data.Semigroup (Semigroup (..))
1011import Data.Typeable (Typeable)
1112import Prelude ()
1213import Prelude.Compat
@@ -23,6 +24,9 @@ data a :<|> b = a :<|> b
2324 deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded)
2425infixr 8 :<|>
2526
27+instance (Semigroup a, Semigroup b) => Semigroup (a :<|> b) where
28+ (a :<|> b) <> (a' :<|> b') = (a <> a') :<|> (b <> b')
29+
2630instance (Monoid a, Monoid b) => Monoid (a :<|> b) where
2731 mempty = mempty :<|> mempty
2832 (a :<|> b) `mappend` (a' :<|> b') = (a `mappend` a') :<|> (b `mappend` b')
servant/src/Servant/Utils/Links.hs+1−1
@@ -82,7 +82,7 @@ module Servant.Utils.Links (
8282
8383 -- * Building and using safe links
8484 --
85− -- | Note that 'URI' is Network.URI.URI from the network-uri package.
85+ -- | Note that 'URI' is from the "Network.URI" module in the @network-uri@ package.
8686 safeLink
8787 , URI(..)
8888 -- * Adding custom types