Export JSON show and Eq
This commit is contained in:
parent
6afe8c2a4e
commit
cd4949b2f8
|
@ -55,6 +55,7 @@ data JSONValue : JSONType -> Type where
|
||||||
```
|
```
|
||||||
|
|
||||||
```idris hide
|
```idris hide
|
||||||
|
export
|
||||||
Show (JSONValue t) where
|
Show (JSONValue t) where
|
||||||
show (VObject xs) =
|
show (VObject xs) =
|
||||||
let xs = dMap (\_,(key, value) => "\"\{key}\":\{show value}") xs
|
let xs = dMap (\_,(key, value) => "\"\{key}\":\{show value}") xs
|
||||||
|
@ -69,6 +70,7 @@ Show (JSONValue t) where
|
||||||
show VNull = "null"
|
show VNull = "null"
|
||||||
|
|
||||||
-- TODO: Deal with keys potentially having different orders in different objects
|
-- TODO: Deal with keys potentially having different orders in different objects
|
||||||
|
export
|
||||||
Eq (JSONValue t) where
|
Eq (JSONValue t) where
|
||||||
(VObject xs) == (VObject ys) =
|
(VObject xs) == (VObject ys) =
|
||||||
assert_total $ xs $== ys
|
assert_total $ xs $== ys
|
||||||
|
|
Loading…
Reference in a new issue