1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE TypeFamilies #-}
3{-# LANGUAGE TypeOperators #-}
6import Control.Monad.Trans.Either
13position :: Int -- ^ value for "x"
14 -> Int -- ^ value for "y"
15 -> EitherT ServantError IO Position
17hello :: Maybe String -- ^ an optional value for "name"
18 -> EitherT ServantError IO HelloMessage
20marketing :: ClientInfo -- ^ value for the request body
21 -> EitherT ServantError IO Email
23position :<|> hello :<|> marketing = client api baseUrl
26baseUrl = BaseUrl Http "localhost" 8081
28queries :: EitherT ServantError IO (Position, HelloMessage, Email)
31 msg <- hello (Just "servant")
32 em <- marketing (ClientInfo "Alp" "alp@foo.com" 26 ["haskell", "mathematics"])
37 res <- runEitherT queries
39 Left err -> putStrLn $ "Error: " ++ show err
40 Right (pos, msg, em) -> do
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list