@@ -156,9 +156,9 @@ to name =
156 Opt.Var (inJsonDecode name)
156 Opt.Var (inJsonDecode name)
159−(=:) :: String -> Opt.Expr -> Opt.Expr
159+field :: String -> Opt.Expr -> Opt.Expr
160−(=:) name decoder =
160+field name decoder =
161− Opt.Binop (inJsonDecode ":=") (Opt.Literal (Literal.Str name)) decoder
161+ to "field" <== [ Opt.Literal (Literal.Str name), decoder ]
164(<==) :: Opt.Expr -> [Opt.Expr] -> Opt.Expr
164(<==) :: Opt.Expr -> [Opt.Expr] -> Opt.Expr
@@ -214,6 +214,6 @@ toRecord fields =
214 to "succeed" <== [ Opt.Record (map toFieldExpr fields) ]
214 to "succeed" <== [ Opt.Record (map toFieldExpr fields) ]
216 andThen (key, tipe) decoder =
216 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 ]
219 List.foldr andThen finalDecoder fields
219 List.foldr andThen finalDecoder fields