mirror of
https://github.com/haskell-servant/servant-ekg.git
synced 2024-11-23 03:29:43 +01:00
Monoid instance of Maybe is not what you think it is
This commit is contained in:
parent
48ab0ea420
commit
9f2ddc8599
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ module Servant.Ekg where
|
||||||
|
|
||||||
import Control.Concurrent.MVar
|
import Control.Concurrent.MVar
|
||||||
import Control.Exception
|
import Control.Exception
|
||||||
|
import Control.Monad
|
||||||
import qualified Data.HashMap.Strict as H
|
import qualified Data.HashMap.Strict as H
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
import Data.Proxy
|
import Data.Proxy
|
||||||
|
@ -98,7 +99,7 @@ class HasEndpoint a where
|
||||||
|
|
||||||
instance (HasEndpoint (a :: *), HasEndpoint (b :: *)) => HasEndpoint (a :<|> b) where
|
instance (HasEndpoint (a :: *), HasEndpoint (b :: *)) => HasEndpoint (a :<|> b) where
|
||||||
getEndpoint _ req =
|
getEndpoint _ req =
|
||||||
getEndpoint (Proxy :: Proxy a) req <>
|
getEndpoint (Proxy :: Proxy a) req `mplus`
|
||||||
getEndpoint (Proxy :: Proxy b) req
|
getEndpoint (Proxy :: Proxy b) req
|
||||||
|
|
||||||
instance (KnownSymbol (path :: Symbol), HasEndpoint (sub :: *)) => HasEndpoint (path :> sub) where
|
instance (KnownSymbol (path :: Symbol), HasEndpoint (sub :: *)) => HasEndpoint (path :> sub) where
|
||||||
|
|
Loading…
Reference in a new issue