@@ -126,7 +126,7 @@ fromText = id
126126-- > e → fail $ "unrecognized user " ⊕ e
127127--
128128setProperty
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
130130 → T. Text -- ^ the JSON property name
131131 → (Value → Parser b ) -- ^ the JSON 'Value' parser that is used to parse the value of the property
132132 → Object -- ^ the parsed JSON 'Value' 'Object'
@@ -158,7 +158,7 @@ setProperty s k p o = case H.lookup (fromText k) o of
158158-- > <$< user ..: "user" % o
159159-- > <*< pwd ..: "pwd" % o
160160--
161- (..:) ∷ FromJSON b ⇒ Lens ' a b → T. Text → Object → Parser (a → a )
161+ (..:) ∷ FromJSON b ⇒ Setter ' a b → T. Text → Object → Parser (a → a )
162162(..:) s k = setProperty s k parseJSON
163163infix 6 ..:
164164{-# INLINE (..:) #-}
@@ -194,7 +194,7 @@ infix 6 ..:
194194-- > <*< setProperty domain "domain" parseJSON o
195195--
196196updateProperty
197- ∷ Lens ' a b
197+ ∷ Setter ' a b
198198 → T. Text
199199 → (Value → Parser (b → b ))
200200 → Object
@@ -230,7 +230,7 @@ updateProperty s k p o = case H.lookup (fromText k) o of
230230-- > <$< auth %.: "auth" % o
231231-- > <*< domain ..: "domain" % o
232232--
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 )
234234(%.:) s k = updateProperty s k parseJSON
235235infix 6 %.:
236236{-# INLINE (%.:) #-}
0 commit comments