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

Experiment: convert any CE effect type to a bifunctor effect #1766

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

neko-kai
Copy link
Member

Seems to be working: cats-effect laws pass, but there may still be problems they don't reveal

@neko-kai neko-kai requested a review from pshirshov as a code owner July 27, 2022 21:04
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2022

Codecov Report

Merging #1766 (1c1553e) into develop (1623459) will decrease coverage by 1.80%.
Report is 2 commits behind head on develop.
The diff coverage is 61.03%.

❗ Current head 1c1553e differs from pull request most recent head 8a1c2ec. Consider uploading reports for the commit 8a1c2ec to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@             Coverage Diff             @@
##           develop    #1766      +/-   ##
===========================================
- Coverage    65.39%   63.59%   -1.80%     
===========================================
  Files          557      479      -78     
  Lines        11061     9636    -1425     
  Branches         0      491     +491     
===========================================
- Hits          7233     6128    -1105     
+ Misses        3828     3508     -320     

@mucaho
Copy link

mucaho commented Jul 28, 2022

Would it be possible to generalize this even further?

Namely, given any monofunctor F[_] and a corresponding cats type class instance e.g. cats.Applicative[F], generate the respective BIO type class instance [+E, +A] => izumi.functional.bio.Applicative2[Bifunctorized[F, E, A]] for it.

Repeat that for all conversions in izumi.functional.bio.CatsConversions, just the other way around

@neko-kai
Copy link
Member Author

neko-kai commented Jul 29, 2022

@mucaho
Sure, just need to make sure it's sound first.

@pshirshov pshirshov force-pushed the develop branch 2 times, most recently from be4d382 to 6dda1f0 Compare February 1, 2023 19:22
@mucaho
Copy link

mucaho commented Oct 6, 2023

Great to see this is still being worked on, thanks!

While this was being worked on, I have created my own two conversions I needed in the meantime, not sure if they are completely sound though, in case anyone needs: https://bitbucket.org/mucaho/ceffbanx/src/8986109fb7e9e97c7ae5a71ba311ff9d915634b8/src/main/scala/org/bitbucket/mucaho/ceffbanx/Util.scala#lines-130:180

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

3 participants