-
Notifications
You must be signed in to change notification settings - Fork 321
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
Add instances for Data.Monoid #1101
Conversation
570dd35
to
806a832
Compare
806a832
to
afe5ae3
Compare
|
||
liftParseJSONList _ _ p a = coerce (p a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this removals are wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it back, and made it coherent with the rest of the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think it would make sense that these two lines
parseJSONList = liftParseJSONList omittedField parseJSON parseJSONList
omittedField = omittedField1
should be added to all the FromJSON instances from Data.Monoid. They were initially there in the First and Last and WrappedMonoid instances, but not in the Down instance. If you agree I can do this.
To make this easier I made #1104 So now the instances are simply using |
Pretty neat ! It was simpler for me to create a new pull request rather than cleaning up this one. Thanks a lot ! |
Most of Data.Monoid newtypes already had an instance. I added the following ones :