pdonadeo / ocaml-lens

Private extraction of astrada's lens library
56 stars 9 forks source link

Add ppx_deriving support. #2

Closed didier-wenzek closed 9 years ago

didier-wenzek commented 9 years ago

Auto generation of lenses for a record using ppx_deriving:

#require "lens.ppx_deriving";;

type car = {
  make : string;
  model: string;
  mileage: int;
} [@@deriving lens { prefix = true }];;

val lens_car_make: (car, string) Lens.t
val lens_car_model: (car, string) Lens.t
val lens_car_mileage: (car, int) Lens.t
foretspaisibles commented 9 years ago

Any plans to merge this?

pdonadeo commented 9 years ago

@michipili I'm finally in my week of vacation, so I'm considering #2 and #3 for merge. Keep in touch :-)