-
Notifications
You must be signed in to change notification settings - Fork 32
genericFromValue fails for a record with four or more fields #173
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
Comments
This is a serious impediment/bug in using this library, does anyone have any ideas about the problem or how to fix it? |
@harendra-kumar - while it looks like PR #178 has the "right" fix for this, in the mean time, you can always write your |
That's great, thanks @jamesdabbs ! |
Gabriel Gonzalez had a similar problem with his -- START Here's a post-mortem explaining what went wrong for those who are curious. The correct version should have four instances:
The first problem was that instances 2 and 3 had an infinite loop, and they get triggered when you have three or more constructors. That's why you got an infinite loop when you had three alternatives The second problem was that instance 1 was missing and was necessary for data types with 4+ alternatives. That is why the code failed to type-check for 4 or more alternatives. -- END Here is the link to the full post and code repo. - E |
For this record I cannot derive a
FromValue
instance:It works if I remove the last field i.e.
resLang
otherwise it produces the following error:Any idea what the problem might be?
The text was updated successfully, but these errors were encountered: