Astrocoders / lenses-ppx

GADT lenses
MIT License
105 stars 10 forks source link

A warning is triggered when defining StateLenses with a single field #19

Closed synaptiko closed 4 years ago

synaptiko commented 4 years ago

Here's an example:

module StateLenses = [%lenses type state = { isChecked: bool }];

The warning will be:

  Warning number 23
  (No file name)

  All the fields are already explicitly listed in this record. You can remove the `...` spread.

It's not obvious where the problem is until you check the code generated by PPX where spread is used in the generated setter.