@@ -51,7 +51,7 @@ emailForClient c = Email from' to' subject' body'
5151 ++ "Since you've recently turned " ++ show (age c)
5252 ++ ", have you checked out our latest "
5353 ++ intercalate ", " (interested_in c)
54− ++ " ? Give us a visit!"
54+ ++ " products? Give us a visit!"
5555
5656type API = "position" :> Capture "x" Int :> Capture "y" Int :> Get '[JSON] Position
5757 :<|> "hello" :> QueryParam "name" String :> Get '[JSON] HelloMessage
@@ -65,15 +65,15 @@ server = position
6565 :<|> hello
6666 :<|> marketing
6767
68− where position :: Int -> Int -> EitherT Int IO Position
68+ where position :: Int -> Int -> EitherT ServantErr IO Position
6969 position x y = return (Position x y)
7070
71− hello :: Maybe String -> EitherT Int IO HelloMessage
71+ hello :: Maybe String -> EitherT ServantErr IO HelloMessage
7272 hello mname = return . HelloMessage $ case mname of
7373 Nothing -> "Hello, anonymous coward"
7474 Just n -> "Hello, " ++ n
7575
76− marketing :: ClientInfo -> EitherT Int IO Email
76+ marketing :: ClientInfo -> EitherT ServantErr IO Email
7777 marketing clientinfo = return (emailForClient clientinfo)
7878
7979app :: Application