Astrocoders / lenses-ppx

GADT lenses
MIT License
105 stars 10 forks source link

feat(deriving): deriver like api #29

Closed fakenickels closed 4 years ago

fakenickels commented 4 years ago
[@lenses]
[@decco]
type bartux = {
  color: string,
  top: int,
};

let bartux = {color: "red", top: 10};

Js.log(bartux->bartux_get(Color));
Js.log(bartux->bartux_set(Top, 20));
Js.log(bartux_encode(bartux));

It still coexists along side with the module extension