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

2228-add MonadError instance for optionT where F is a Monad #2299

Conversation

heyrutvik
Copy link
Contributor

@heyrutvik heyrutvik commented Jun 18, 2018

related to #2228

@@ -287,6 +290,29 @@ private[data] trait OptionTMonad[F[_]] extends Monad[OptionT[F, ?]] {
)))
}

private[data] trait OptionTMonadErrorMonad[F[_]] extends MonadError[OptionT[F, ?], Unit] {
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if it'd be possible to extend OptionTMonad[F] here to reduce duplication (like the trait below does).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see.. You are right. I should have mixin OptionTMonad[F]. Changing it..

@codecov-io
Copy link

codecov-io commented Jun 18, 2018

Codecov Report

Merging #2299 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2299      +/-   ##
==========================================
+ Coverage   95.05%   95.06%   +<.01%     
==========================================
  Files         338      338              
  Lines        5850     5860      +10     
  Branches      220      221       +1     
==========================================
+ Hits         5561     5571      +10     
  Misses        289      289
Impacted Files Coverage Δ
core/src/main/scala/cats/data/OptionT.scala 97.75% <100%> (+0.28%) ⬆️

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 daa646d...50cd9e9. Read the comment docs.

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.

5 participants