Merged
Conversation
Contributor
Author
|
|
garyb
requested changes
Jul 16, 2018
src/Data/Monoid/Alternate.purs
Outdated
| append (Alternate a) (Alternate b) = Alternate (a <|> b) | ||
|
|
||
| instance monoidAlternate :: Plus f => Monoid (Alternate f a) where | ||
| mempty = Alternate empty No newline at end of file |
Member
There was a problem hiding this comment.
Sorry to be super nitpicky, but can you put an empty newline at the end of the file too please?
|
|
||
| derive newtype instance eqAlternate :: Eq (f a) => Eq (Alternate f a) | ||
|
|
||
| derive newtype instance ordAlternate :: Ord (f a) => Ord (Alternate f a) |
Member
There was a problem hiding this comment.
Can we add Eq1 and Ord1 instances while we're here? You should be able to derive them I think, with Eq1 / Ord1 constraints on f.
d7822b7 to
a5c1b6e
Compare
Contributor
Author
|
Updated |
garyb
approved these changes
Jul 17, 2018
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the merge of the deprecated monoid lib into Prelude, all the newtypes except this were kept. This can't fit in the prelude, because
Altexists here.