-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TH Generation of LabelOptic instances for prisms on sum-types #354
Comments
This is essentially what |
How about having a |
Declaring a type within Interesting proposition. I imagine that generation of optics for both fields and constructors for a data type is useful mostly when you have partial field accessors, but If only we had viable (i.e. not conflicting with strict fields) way to construct values of such types with optics... |
I've been suggesting it so that there'd be a single function to call no matter what structure you're dealing with. More so, it would allow to pass a bunch of type declarations (your whole domain model ideally) into a single call of |
Which for the following type:
would generate instances like the following:
Allowing to address this sum-type like this:
Benefits
_PrismName
naming convention.The text was updated successfully, but these errors were encountered: