Skip to content

Commit

Permalink
v0.14.2
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Wong <cwong@janestreet.com>
  • Loading branch information
cwong-ocaml committed Oct 30, 2020
1 parent 8c42c26 commit 8b9ccda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.14.2

- Update to ppxlib 0.18.0

## v0.14.1

- Update to ppxlib 0.14.0
Expand Down
2 changes: 1 addition & 1 deletion ppx_fields_conv.opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ depends: [
"base" {>= "v0.14" & < "v0.15"}
"fieldslib" {>= "v0.14" & < "v0.15"}
"dune" {>= "2.0.0"}
"ppxlib" {>= "0.14.0"}
"ppxlib" {>= "0.18.0"}
]
synopsis: "Generation of accessor and iteration functions for ocaml records"
description: "
Expand Down
7 changes: 2 additions & 5 deletions src/ppx_fields_conv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ let check_no_collision =

module A = struct (* Additional AST construction helpers *)

let exp_string : (loc:Location.t -> string -> expression) = fun ~loc s ->
pexp_constant ~loc (Pconst_string (s,None))

let pat_name : (loc:Location.t -> string -> pattern) = fun ~loc name ->
ppat_var ~loc (Loc.make name ~loc)

Expand Down Expand Up @@ -440,7 +437,7 @@ module Gen_struct = struct
[%expr
Fieldslib.Field.Field { Fieldslib.Field.For_generated_code.
force_variance = (fun (_ : [%t perm]) -> ());
name = [%e A.exp_string ~loc name];
name = [%e estring ~loc name];
getter = [%e A.exp_name ~loc name];
setter = [%e setter_field];
fset = [%e fset];}]
Expand Down Expand Up @@ -725,7 +722,7 @@ module Gen_struct = struct
let getter_and_setters, fields = gen_fields ~private_ ~loc labdecs in
let create = creation_fun ~loc record_name labdecs in
let simple_create = simple_creation_fun ~loc record_name labdecs in
let names = List.map (Inspect.field_names labdecs) ~f:(A.exp_string ~loc) in
let names = List.map (Inspect.field_names labdecs) ~f:(estring ~loc) in
let fields_module =
if String.equal record_name "t" then "Fields" else "Fields_of_" ^ record_name
in
Expand Down

0 comments on commit 8b9ccda

Please sign in to comment.