1{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE DerivingStrategies #-}
5{-# LANGUAGE OverloadedStrings #-}
6{-# LANGUAGE TypeOperators #-}
10import Control.Monad.Trans (MonadIO (liftIO))
12import qualified Data.ByteString.Lazy.Char8 as BL8
13import Data.IORef (IORef, newIORef, readIORef, writeIORef)
17 "add" :> Get '[JSON] ()
18 :<|> "healthcheck" :> Get '[JSON] ()
20healthcheck :: IORef Int -> Handler ()
22 t <- liftIO $ readIORef ref
25 n -> throwError $ err500 {errBody = "observed inconsistency: " <> BL8.pack (show n)}
27makeServer :: IO (Server UnsafeApi)
34unsafeMunge :: IORef Int -> Handler ()
35unsafeMunge ref = liftIO $ do
37 writeIORef ref (t + 1)
39 writeIORef ref (t2 -1)
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