1{-# LANGUAGE RankNTypes #-}
2{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE FlexibleContexts #-}
4{-# LANGUAGE OverloadedStrings #-}
5{-# LANGUAGE TypeOperators #-}
6{-# LANGUAGE ScopedTypeVariables #-}
7{-# LANGUAGE TypeApplications #-}
9module TupleExample where
17import Servant.Reflex.Tuple
19type TestAPI = Get '[JSON] Int
20 -- :<|> Post '[JSON] Int
21 :<|> Capture "name" Text :> Post '[JSON] Text
24run :: forall t m. (SupportsServantReflex t m, MonadWidget t m) => m ()
26 let (getInt :<|> greet) = client (Proxy @TestAPI) (Proxy @m) (BasePath "/")
27 -- let getInt = client (Proxy @TestAPI) (Proxy @m) (BasePath "/")
28 b <- button "Go for it"
29 g <- ("greg" <$) <$> button "Hello"
30 -- g <- button "Hello"
32 display =<< holdDyn (Left "Waiting") b'
34 display =<< holdDyn (Left "Waiting") g'
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