git.iko.soy/rowtype-yoga/purescript-yoga-json
on main help sign in
Make the type variable in `read*` functions visibly-applicable (#24)
247014epostsolar
CHANGELOG.md+4
@@ -1,5 +1,9 @@
1# Changelog
1# Changelog
2
2
3+## v4.0.1
4+
5+- Allow the type of `read*` functions to be visibly applied (#24 by @postsolar)
6+
3## v4.0.0
7## v4.0.0
4- Replace `bigints` dependency with `js-bigints` so that no more external npm dependency is needed (#11 by @sigma-andex)
8- Replace `bigints` dependency with `js-bigints` so that no more external npm dependency is needed (#11 by @sigma-andex)
5
9
src/Yoga/JSON.purs+6−6
@@ -90,7 +90,7 @@ type E a = Either MultipleErrors a
90-- | Read a JSON string to a type `a` while returning a `MultipleErrors` if the
90-- | Read a JSON string to a type `a` while returning a `MultipleErrors` if the
91-- | parsing failed.
91-- | parsing failed.
92readJSON ∷
92readJSON ∷
93− ∀ a.
93+ ∀ @a.
94 ReadForeign a ⇒
94 ReadForeign a ⇒
95 String →
95 String →
96 E a
96 E a
@@ -98,7 +98,7 @@ readJSON = runExcept <<< (readImpl <=< parseJSON)
98
98
99-- | Read a JSON string to a type `a` using `F a`. Useful with record types.
99-- | Read a JSON string to a type `a` using `F a`. Useful with record types.
100readJSON' ∷
100readJSON' ∷
101− ∀ a.
101+ ∀ @a.
102 ReadForeign a ⇒
102 ReadForeign a ⇒
103 String →
103 String →
104 F a
104 F a
@@ -107,7 +107,7 @@ readJSON' = readImpl <=< parseJSON
107-- | Read a JSON string to a type `a` while returning `Nothing` if the parsing
107-- | Read a JSON string to a type `a` while returning `Nothing` if the parsing
108-- | failed.
108-- | failed.
109readJSON_ ∷
109readJSON_ ∷
110− ∀ a.
110+ ∀ @a.
111 ReadForeign a ⇒
111 ReadForeign a ⇒
112 String →
112 String →
113 Maybe a
113 Maybe a
@@ -147,14 +147,14 @@ write = writeImpl
147
147
148-- | Read a Foreign value to a type
148-- | Read a Foreign value to a type
149read ∷
149read ∷
150− ∀ a.
150+ ∀ @a.
151 ReadForeign a ⇒
151 ReadForeign a ⇒
152 Foreign →
152 Foreign →
153 E a
153 E a
154read = runExcept <<< readImpl
154read = runExcept <<< readImpl
155
155
156read' ∷
156read' ∷
157− ∀ a.
157+ ∀ @a.
158 ReadForeign a ⇒
158 ReadForeign a ⇒
159 Foreign →
159 Foreign →
160 F a
160 F a
@@ -162,7 +162,7 @@ read' = readImpl
162
162
163-- | Read a Foreign value to a type, as a Maybe of type
163-- | Read a Foreign value to a type, as a Maybe of type
164read_ ∷
164read_ ∷
165− ∀ a.
165+ ∀ @a.
166 ReadForeign a ⇒
166 ReadForeign a ⇒
167 Foreign →
167 Foreign →
168 Maybe a
168 Maybe a