-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
fromEither
should be called fromRight
to match Haskell and allow for fromLeft
#642
Comments
I see three options:
Which option do you favour? |
Do you think, if rename anything at all, we should choose once whether to use type or constructor names in these function? If we choose to always use constructor names, I think the best strategy is to use type names when no confusion is imaginable, otherwise use constructor names. Under this rule, I also noticed other similar inconsistencies, so I think
And fromEither :: Either a a -> a |
I disagree, these goals are not reached yet:
|
@futpib, shall we close this issue and open a new one for the conversion functions, or would you prefer to update this issue's title and description? |
Having #644 open is enough, I think |
Eventually, we might want to have both
fromLeft
andfromRight
:but right now we have
fromEither :: b -> Either a b -> b
which, if kept as it is, would result in this inconsistency:Also,
fromEither
is a good name for a different function:This would also match names for these function in Haskell
The text was updated successfully, but these errors were encountered: