1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE RecordWildCards #-}
4{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
5{-# OPTIONS_GHC -fno-warn-orphans #-}
7module Compare.BufferBuilder () where
12import Data.BufferBuilder.Json
13import Data.Int (Int64)
14import Data.Monoid ((<>))
15import Prelude hiding (id)
17import qualified Data.BufferBuilder.Utf8 as UB
19instance (ToJson a, ToJson b) => ToJson (a,b) where
20 toJson (a,b) = array [toJson a, toJson b]
22instance ToJson Int64 where
23 toJson a = unsafeValueUtf8Builder $
24 UB.appendDecimalSignedInt (fromIntegral a)
27instance ToJson Metadata where
28 toJson Metadata{..} = toJson $
29 "result_type" .= result_type
31instance ToJson Geo where
32 toJson Geo{..} = toJson $
34 <> "coordinates" .= coordinates
36instance ToJson Story where
37 toJson Story{..} = toJson $
38 "from_user_id_str" .= from_user_id_str
39 <> "profile_image_url" .= profile_image_url
40 <> "created_at" .= created_at
41 <> "from_user" .= from_user
43 <> "metadata" .= metadata
44 <> "to_user_id" .= to_user_id
47 <> "from_user_id" .= from_user_id
49 <> "iso_language_code" .= iso_language_code
50 <> "to_user_id_str" .= to_user_id_str
53instance ToJson Result where
54 toJson Result{..} = toJson $
57 <> "since_id" .= since_id
58 <> "refresh_url" .= refresh_url
59 <> "next_page" .= next_page
60 <> "results_per_page" .= results_per_page
62 <> "completed_in" .= completed_in
63 <> "since_id_str" .= since_id_str
64 <> "max_id_str" .= max_id_str
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