From dc4b4be42ea851d29be62ece4bfbd1b6210fad08 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 19 Jan 2017 19:04:36 +0200 Subject: [PATCH] Improve formatting of haddock --- servant/src/Servant/API/Alternative.hs | 4 ++++ servant/src/Servant/Utils/Links.hs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/servant/src/Servant/API/Alternative.hs b/servant/src/Servant/API/Alternative.hs index 8a8a693f..130f7529 100644 --- a/servant/src/Servant/API/Alternative.hs +++ b/servant/src/Servant/API/Alternative.hs @@ -7,6 +7,7 @@ {-# OPTIONS_HADDOCK not-home #-} module Servant.API.Alternative ((:<|>)(..)) where +import Data.Semigroup (Semigroup (..)) import Data.Typeable (Typeable) import Prelude () import Prelude.Compat @@ -23,6 +24,9 @@ data a :<|> b = a :<|> b deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded) infixr 8 :<|> +instance (Semigroup a, Semigroup b) => Semigroup (a :<|> b) where + (a :<|> b) <> (a' :<|> b') = (a <> a') :<|> (b <> b') + instance (Monoid a, Monoid b) => Monoid (a :<|> b) where mempty = mempty :<|> mempty (a :<|> b) `mappend` (a' :<|> b') = (a `mappend` a') :<|> (b `mappend` b') diff --git a/servant/src/Servant/Utils/Links.hs b/servant/src/Servant/Utils/Links.hs index 618bb2aa..ee7090e1 100644 --- a/servant/src/Servant/Utils/Links.hs +++ b/servant/src/Servant/Utils/Links.hs @@ -82,7 +82,7 @@ module Servant.Utils.Links ( -- * Building and using safe links -- - -- | Note that 'URI' is Network.URI.URI from the network-uri package. + -- | Note that 'URI' is from the "Network.URI" module in the @network-uri@ package. safeLink , URI(..) -- * Adding custom types