Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 23a33fb

Browse files
authored
Merge pull request #6 from garyb/updates
Misc minor updates
2 parents 9c70687 + e515d33 commit 23a33fb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Data/Json/Extended.purs

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Data.Json.Extended
55
, getEJson
66
, roll
77
, unroll
8+
, head
89

910
, null
1011
, boolean
@@ -71,6 +72,9 @@ unroll =
7172
>>> Mu.unroll
7273
>>> map EJson
7374

75+
head EJson Sig.EJsonF (Mu.Mu Sig.EJsonF)
76+
head = Mu.unroll <<< getEJson
77+
7478
instance eqEJsonEq EJson where
7579
eq (EJson a) (EJson b) =
7680
eq1 (Mu.unroll a) (Mu.unroll b)
@@ -103,8 +107,8 @@ instance encodeJsonEJson ∷ EncodeJson EJson where
103107
asKey
104108
EJson
105109
M.Maybe String
106-
asKey (EJson x) =
107-
case Mu.unroll x of
110+
asKey (EJson y) =
111+
case Mu.unroll y of
108112
Sig.String k → pure k
109113
_ → M.Nothing
110114

src/Data/Json/Extended/Signature/Core.purs

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ data EJsonF a
2121
| Boolean Boolean
2222
| Integer Int
2323
| Decimal HN.HugeNum
24-
| String String
2524
| Timestamp String
2625
| Date String
2726
| Time String

0 commit comments

Comments
 (0)