neotypes.Async implicit imports cause divergent implicits
See original GitHub issueI have code that uses cats-effect
with higher-kinded types in most of my functions. Here’s an example that should compile fine using the cats.effect.Async
typeclass:
import cats.implicits._
import cats.effect._
def flatMapF[F[_]: Async](f: F[Any]): F[Unit] = f.flatMap(_ => Async[F].unit)
This code compiles and works fine unless I import the implicits for neotypes.Async
by importing neotypes.implicits.all._
or neotypes.implicits.syntax.all._
. The code fails to compile due to a divergent implicit leading the compiler to not know which flatMap
method to call.
Currently using the latest snapshot build from master, built locally (0.9.1-SNAPSHOT
).
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
neotypes: Overview
Scala lightweight, type-safe, asynchronous driver for neo4j. ... derive an implicit ResultMapper for case classes. import neotypes.implicits.syntax.string.
Read more >How can I solve the Diverging implicit expansion for type
But I need to be able to compare Events of different values V . How can I solve this diverging implicit expansion? import...
Read more >What do all the newbie's feel about the diverging implicits ...
Yes, that import brings more implicits into scope. This makes implicit resolution diverge. If you only have the Sync instance/implicit for IO in ......
Read more >Awesome JavaScript Awesome - DirDev.com
Awesome JavaScript Awesome. A collection of awesome browser-side JavaScript libraries, resources and shiny things. Awesome JavaScript; Package Managers ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any place in user land where
map
andflatMap
might be used forneotypes.Async[F]
? If not I think it should be better to hide this from the public API.@sloshy @BalmungSan wow that’s amazing exploration and brainstorm!
@BalmungSan I support the approach with making it private. I’m going to complete and merge #34 tomorrow