1module Shared.Json (readJsonAff, readAff) where
5import Control.Monad.Error.Class (throwError)
6import Data.Argonaut (jsonParser)
7import Data.Argonaut.Core (Json)
8import Data.Argonaut.Decode (decodeJson, printJsonDecodeError)
9import Data.Argonaut.Decode.Class (class DecodeJson)
10import Data.Either (Either, either)
11import Effect.Aff (Aff)
12import Effect.Class (liftEffect)
13import Effect.Exception (throw, error)
15readJsonAff ∷ ∀ a. DecodeJson a => String -> Aff a
16readJsonAff s = either (throwError <<< error) pure (jsonParser s) >>= readAff
18readAff ∷ ∀ a. DecodeJson a => Json -> Aff a
19readAff s = either (throwError <<< error <<< printJsonDecodeError) pure (decodeJson s)
21orThrow ∷ ∀ a s. Show s => Either s a -> Aff a
22orThrow = either (show >>> throw >>> liftEffect) pure
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