This commit is contained in:
Timo von Holtz 2015-05-01 16:09:23 +10:00
parent 52585c70e6
commit 04fce530d6

View file

@ -1,10 +1,10 @@
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverlappingInstances #-}
import Control.Concurrent import Control.Concurrent
import Data.Aeson import Data.Aeson
@ -14,8 +14,8 @@ import Data.Text
import GHC.Generics import GHC.Generics
import Network.Wai import Network.Wai
import Network.Wai.Handler.Warp import Network.Wai.Handler.Warp
import System.Metrics
import Servant import Servant
import System.Metrics
import Servant.Ekg import Servant.Ekg
@ -56,7 +56,7 @@ server = helloH :<|> postGreetH :<|> deleteGreetH
helloH name (Just False) = return . Greet $ "Hello, " <> name helloH name (Just False) = return . Greet $ "Hello, " <> name
helloH name (Just True) = return . Greet . toUpper $ "Hello, " <> name helloH name (Just True) = return . Greet . toUpper $ "Hello, " <> name
postGreetH greet = return greet postGreetH = return
deleteGreetH _ = return () deleteGreetH _ = return ()