-
Notifications
You must be signed in to change notification settings - Fork 323
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
Merge empty_error #9000
Merge empty_error #9000
Conversation
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.
A few stylist in tweaks but looks good. And only one type makes me happy.
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Statistics.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Empty_Error.enso
Outdated
Show resolved
Hide resolved
8981b53
to
1091260
Compare
distribution/lib/Standard/Base/0.0.0-dev/src/Errors/Empty_Error.enso
Outdated
Show resolved
Hide resolved
3ed2983
to
3769c95
Compare
@@ -710,7 +710,7 @@ type Array | |||
|
|||
[0, 1, 2].to_array . reduce (+) | |||
reduce : (Any -> Any -> Any) -> Any -> Any | |||
reduce self function ~if_empty=(Error.throw Empty_Error) = Vector.reduce self function if_empty | |||
reduce self function ~if_empty=(Error.throw (Empty_Error.Error Vector)) = Vector.reduce self function if_empty |
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.
Shouldn't this be
reduce self function ~if_empty=(Error.throw (Empty_Error.Error Vector)) = Vector.reduce self function if_empty | |
reduce self function ~if_empty=(Error.throw (Empty_Error.Error Array)) = Vector.reduce self function if_empty |
given that we are operating with an Array here??
I know they are pretty much interchangeable but they still are separate types.
(Sorry I just noticed it after getting a merge conflict with #8867)
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.
Yes. Good spot :) I will change that.
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.
Pull Request Description
We don't need 3 copies of empty_error. This PR makes them one.
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.