@@ -126,7 +126,7 @@ fromText = id
126
126
-- > e → fail $ "unrecognized user " ⊕ e
127
127
--
128
128
setProperty
129
- ∷ Lens ' a b -- ^ a lens into the target that is updated by the parser
129
+ ∷ Setter ' a b -- ^ a lens into the target that is updated by the parser
130
130
→ T. Text -- ^ the JSON property name
131
131
→ (Value → Parser b ) -- ^ the JSON 'Value' parser that is used to parse the value of the property
132
132
→ Object -- ^ the parsed JSON 'Value' 'Object'
@@ -158,7 +158,7 @@ setProperty s k p o = case H.lookup (fromText k) o of
158
158
-- > <$< user ..: "user" % o
159
159
-- > <*< pwd ..: "pwd" % o
160
160
--
161
- (..:) ∷ FromJSON b ⇒ Lens ' a b → T. Text → Object → Parser (a → a )
161
+ (..:) ∷ FromJSON b ⇒ Setter ' a b → T. Text → Object → Parser (a → a )
162
162
(..:) s k = setProperty s k parseJSON
163
163
infix 6 ..:
164
164
{-# INLINE (..:) #-}
@@ -194,7 +194,7 @@ infix 6 ..:
194
194
-- > <*< setProperty domain "domain" parseJSON o
195
195
--
196
196
updateProperty
197
- ∷ Lens ' a b
197
+ ∷ Setter ' a b
198
198
→ T. Text
199
199
→ (Value → Parser (b → b ))
200
200
→ Object
@@ -230,7 +230,7 @@ updateProperty s k p o = case H.lookup (fromText k) o of
230
230
-- > <$< auth %.: "auth" % o
231
231
-- > <*< domain ..: "domain" % o
232
232
--
233
- (%.:) ∷ FromJSON (b → b ) ⇒ Lens ' a b → T. Text → Object → Parser (a → a )
233
+ (%.:) ∷ FromJSON (b → b ) ⇒ Setter ' a b → T. Text → Object → Parser (a → a )
234
234
(%.:) s k = updateProperty s k parseJSON
235
235
infix 6 %.:
236
236
{-# INLINE (%.:) #-}
0 commit comments