-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Nothing #2778
Comments
Are you proposing adding them to |
Some precedence: https://hackage.haskell.org/package/void-0.6.1/docs/Data-Void.html |
What's the motivation? I'd be worried that those instances would increase the chances of unwanted nothings being inferred. |
@kailuowang to @milessabin mainly because it is possible and def foo[A: Eq](xs: List[A], ys: List[A]): Option[A] =
if(xs === ys) xs.headOption
else None
foo(Nil, Nil) |
These can be useful for tests. E.g. in ZIO when creating an abstraction like |
What do you think about adding instances for Nothing like
Eq
,Ord
,Semigroup
?I can submit a PR
The text was updated successfully, but these errors were encountered: