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

Syntax for ApplicativeError #947

Merged
merged 2 commits into from
Mar 28, 2016
Merged

Syntax for ApplicativeError #947

merged 2 commits into from
Mar 28, 2016

Conversation

davegurnell
Copy link

I've added syntax for the methods I mentioned in #561.

I'm happy with raiseError, handleError, handleErrorWith, recover, and recoverWith. However, I'm not sure about attemptT because the tests in ApplicativeErrorTests.scala required a bunch of heavyweight type hinting.

My inclination is to remove attempt and attemptT and leave the other methods intact. What do you think?

}

test("attemptT syntax creates an XorT") {
type ErrorOrT[A] = XorT[ErrorOr, String, A]
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't appear to be used. Please tell me that it's mere presence doesn't affect whether the next line compiles? :|

@ceedubs
Copy link
Contributor

ceedubs commented Mar 25, 2016

@davegurnell thank you!

I'm probably missing something but the tests don't really appear to have more type gymnastics for attempt and attemptT than for other methods to me. Could you elaborate on the issue with those?

👍 either with or without attempt and attemptT

@davegurnell
Copy link
Author

I guess it was late when I wrote the PR. The type annotations were on the expected value in the test for attemptT, not on the use of attemptT itself. I reckon this is good to go now.

@adelbertc
Copy link
Contributor

In light of the fixed build (#954) this need to be re-merged against the latest master. Sorry about that!

@codecov-io
Copy link

Current coverage is 88.88%

Merging #947 into master will decrease coverage by -0.05% as of 291ebf3

@@            master    #947   diff @@
======================================
  Files          179     180     +1
  Stmts         2133    2142     +9
  Branches        42      42       
  Methods          0       0       
======================================
+ Hit           1897    1904     +7
  Partial          0       0       
- Missed         236     238     +2

Review entire Coverage Diff as of 291ebf3

Powered by Codecov. Updated on successful CI builds.

@adelbertc
Copy link
Contributor

👍

@adelbertc adelbertc merged commit 79d40a9 into typelevel:master Mar 28, 2016
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.

4 participants