4import qualified Data.Foldable as F
5import qualified Data.HashMap.Strict as HashMap
6import qualified Data.Vector as Vector
10isSubJSON :: Value -> Value -> Bool
11isSubJSON Null _ = True
12isSubJSON (Object x) (Object y) = HashMap.keys x == HashMap.keys i && F.and i
14 i = HashMap.intersectionWith isSubJSON x y
15isSubJSON (Array xs) (Array ys) = Vector.length xs == Vector.length ys && F.and (Vector.zipWith isSubJSON xs ys)
18(<=>) :: (Eq a, Show a, ToJSON a, FromJSON a) => a -> Value -> Spec
20 it "encodes correctly" $ do
21 toJSON x `shouldBe` js
22 it "decodes correctly" $ do
23 fromJSON js `shouldBe` Success x
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