Improve formatting of haddock

This commit is contained in:
Oleg Grenrus 2017-01-19 19:04:36 +02:00
parent 22b4d1301d
commit dc4b4be42e
2 changed files with 5 additions and 1 deletions

View file

@ -7,6 +7,7 @@
{-# OPTIONS_HADDOCK not-home #-} {-# OPTIONS_HADDOCK not-home #-}
module Servant.API.Alternative ((:<|>)(..)) where module Servant.API.Alternative ((:<|>)(..)) where
import Data.Semigroup (Semigroup (..))
import Data.Typeable (Typeable) import Data.Typeable (Typeable)
import Prelude () import Prelude ()
import Prelude.Compat import Prelude.Compat
@ -23,6 +24,9 @@ data a :<|> b = a :<|> b
deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded) deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded)
infixr 8 :<|> 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 instance (Monoid a, Monoid b) => Monoid (a :<|> b) where
mempty = mempty :<|> mempty mempty = mempty :<|> mempty
(a :<|> b) `mappend` (a' :<|> b') = (a `mappend` a') :<|> (b `mappend` b') (a :<|> b) `mappend` (a' :<|> b') = (a `mappend` a') :<|> (b `mappend` b')

View file

@ -82,7 +82,7 @@ module Servant.Utils.Links (
-- * Building and using safe 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 safeLink
, URI(..) , URI(..)
-- * Adding custom types -- * Adding custom types