-
Notifications
You must be signed in to change notification settings - Fork 19
Add Extend
and Semigroup
instances.
#5
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
Conversation
Add `Extend` and `Semigroup` instances.
Nice, thanks. |
Is this the only way of extending a instance semigroupMaybe :: (Semigroup a) => Semigroup (Maybe a) where
(<>) (Just x) (Just y) = Just (x <> y)
(<>) _ _ = Nothing Seems like your case is already handled by Also, just for my own curiosity, what is the |
Sorry, ignore the part about Still, does it make sense to |
The version I just merged is the way Haskell implements
|
I was just wondering what it's used for. I mean, I know what the |
Why not just |
Ah, I see what you mean. @joneshf? |
Right, I think they're both lawful instances and it comes down to semantics. Though, one instance might play nicer with I think short cutting the Thoughts? |
I don't mind about |
Sounds good to me. Honestly, I don't have an immediate use for this. I just saw it could be done, so I made a PR :D |
Should I do a release of this with |
Sounds good to me. |
No description provided.