Skip to content
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 note explain why Except instead of Either #58

Merged
merged 2 commits into from
Feb 25, 2017

Conversation

chexxor
Copy link
Contributor

@chexxor chexxor commented Feb 24, 2017

I've forever wondered what value is worth the price of putting runExcept everywhere. After asking, it seems like how they accumulate errors is the reason.

@@ -81,6 +81,8 @@ renderForeignError (TypeMismatch exp act) = "Type mismatch: expected " <> exp <>

-- | An error monad, used in this library to encode possible failures when
-- | dealing with foreign data.
-- | `Except e` was chosen instead of `Either e` because `Except`'s `Alt` instance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an extra newline here please, so that this gets rendered as two lines in the output?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, nitpick: instead of "was chosen", I would prefer to phrase this more like "The Alt instance for Except allows us to accumulate multiple errors, unlike Either, or something along those lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas. On second read, my phrasing was a bit awkward.
Updated.

@paf31 paf31 merged commit dd7a14c into purescript:master Feb 25, 2017
@paf31
Copy link
Contributor

paf31 commented Feb 25, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants