@@ -156,9 +156,9 @@ to name =
156156 Opt.Var (inJsonDecode name)
157157
158158
159−(=:) :: String -> Opt.Expr -> Opt.Expr
160−(=:) name decoder =
161− Opt.Binop (inJsonDecode ":=") (Opt.Literal (Literal.Str name)) decoder
159+field :: String -> Opt.Expr -> Opt.Expr
160+field name decoder =
161+ to "field" <== [ Opt.Literal (Literal.Str name), decoder ]
162162
163163
164164(<==) :: Opt.Expr -> [Opt.Expr] -> Opt.Expr
@@ -214,6 +214,6 @@ toRecord fields =
214214 to "succeed" <== [ Opt.Record (map toFieldExpr fields) ]
215215
216216 andThen (key, tipe) decoder =
217− to "andThen" <== [ key =: decode tipe, Opt.Function [key] decoder ]
217+ to "andThen" <== [ field key (decode tipe), Opt.Function [key] decoder ]
218218 in
219219 List.foldr andThen finalDecoder fields