Skip to content

Commit

Permalink
more confident these locs are correct
Browse files Browse the repository at this point in the history
  • Loading branch information
benbellick committed Dec 19, 2024
1 parent 2790265 commit 340c8ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/encoders_deriver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ and expr_of_variant ~loc cstrs =
CCList.map
(fun { pld_name; _ } ->
( { txt = Lident pld_name.txt; loc },
Ast_builder.Default.pvar ~loc
(*TODO: is this right loc*) pld_name.txt ))
Ast_builder.Default.pvar ~loc pld_name.txt ))
lbl_decls
in
Some (Ast_builder.Default.ppat_record ~loc arg_fields Closed)
Expand Down Expand Up @@ -233,8 +232,7 @@ let implementation_generator ~(loc : location) type_decl : expression =
CCList.map
(fun { pld_name; _ } ->
( { txt = Lident pld_name.txt; loc },
Ast_builder.Default.pvar ~loc
(*TODO: is this right loc*) pld_name.txt ))
Ast_builder.Default.pvar ~loc pld_name.txt ))
label_decs
in
let args = Ast_builder.Default.ppat_record ~loc arg_fields Closed in
Expand Down

0 comments on commit 340c8ef

Please sign in to comment.