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

added liftTo to Try, Either and Option #2179

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

kailuowang
Copy link
Contributor

simple syntax extensions

@kailuowang kailuowang added this to the 1.1 milestone Mar 1, 2018
@kailuowang kailuowang changed the title added liftTo to Try Either and Option added liftTo to Try, Either and Option Mar 1, 2018
@codecov-io
Copy link

codecov-io commented Mar 1, 2018

Codecov Report

Merging #2179 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2179      +/-   ##
==========================================
+ Coverage   94.71%   94.75%   +0.04%     
==========================================
  Files         329      330       +1     
  Lines        5558     5568      +10     
  Branches      215      201      -14     
==========================================
+ Hits         5264     5276      +12     
+ Misses        294      292       -2
Impacted Files Coverage Δ
core/src/main/scala/cats/syntax/TrySyntax.scala 100% <100%> (ø)
core/src/main/scala/cats/ApplicativeError.scala 100% <100%> (+11.76%) ⬆️
core/src/main/scala/cats/syntax/either.scala 99.16% <100%> (ø) ⬆️
core/src/main/scala/cats/syntax/option.scala 100% <100%> (ø) ⬆️
.../src/main/scala/cats/syntax/applicativeError.scala 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60c3546...423cb0c. Read the comment docs.

@kailuowang kailuowang requested a review from tpolecat March 2, 2018 15:18
Copy link
Member

@tpolecat tpolecat left a comment

Choose a reason for hiding this comment

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

👍

* res1: scala.Either[String, Int] = Left(Empty)
* }}}
*/
def liftTo[F[_]]: LiftToPartiallyApplied[F, A] = new LiftToPartiallyApplied(oa)
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised this works because LiftToPartiallyApplied is marked private[cats] … I guess I can have a value of this type but I can't declare or ascribe it. Interesting trick.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the fun of working with scala.

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

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

👍

@kailuowang kailuowang merged commit 9135035 into typelevel:master Mar 2, 2018
@kailuowang kailuowang deleted the fromOption branch March 2, 2018 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants