You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in [> `Foo | `Bar ] there's a type variable like there's a type variable in 'a StringMap.t. it would be even nicer to provide the function for 'a as well to complete the printing :)
Position: on a variant type comprising exactly one constructor with an argument. The type of that argument must be string. All other constructors must have no arguments.
Hm... wondering what's the motivation for this restriction.
Activity
[-]Support open variants[/-][+]PPX: Support open variants[/+]anmonteiro commentedon Nov 28, 2024
in
[> `Foo | `Bar ]there's a type variable like there's a type variable in'a StringMap.t. it would be even nicer to provide the function for'aas well to complete the printing :)andreypopp commentedon Nov 28, 2024
I was referring to this .atd's open enum feature https://atd.readthedocs.io/en/latest/atdgen.html#field-open-enum which works either for poly or regular variants.
andreypopp commentedon Nov 28, 2024
Hm... wondering what's the motivation for this restriction.
anmonteiro commentedon Nov 28, 2024
probably a small optimization? if you don't allocate + create all ints + one string for the one with payload, you save a little bit?