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

Cannot find implicit Functor for Kleisli of ValidatedNel #943

Closed
ceedubs opened this issue Mar 21, 2016 · 3 comments
Closed

Cannot find implicit Functor for Kleisli of ValidatedNel #943

ceedubs opened this issue Mar 21, 2016 · 3 comments

Comments

@ceedubs
Copy link
Contributor

ceedubs commented Mar 21, 2016

The Functor for a ValidatedNel is found just find. But for some reason trying to find the Functor for a Kleisli where the effect type is ValidatedNel doesn't work. I haven't yet tried to debug what's going wrong here.

> coreJVM/console
[info] Compiling 4 Scala sources to /Users/v751429/code/cats/core/.jvm/target/scala-2.11/classes...
[info] Compiling 8 Scala sources to /Users/v751429/code/cats/core/.jvm/target/scala-2.11/classes...
[info] Starting scala interpreter...
[info] 
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions for evaluation. Or try :help.

scala> import cats._, data._, implicits._
import cats._
import data._
import implicits._

scala> Functor[ValidatedNel[String, ?]]
res0: cats.Functor[[β]cats.data.Validated[cats.data.OneAnd[[+A]List[A],String],β]] = cats.data.ValidatedInstances$$anon$1@688a8f50

scala> Functor[Kleisli[ValidatedNel[String, ?], Int, ?]]
<console>:21: error: could not find implicit value for parameter instance: cats.Functor[[γ]cats.data.Kleisli[[β]cats.data.Validated[cats.data.OneAnd[[+A]List[A],String],β],Int,γ]]
       Functor[Kleisli[ValidatedNel[String, ?], Int, ?]]
@travisbrown
Copy link
Contributor

This looks kind of like an issue I opened years ago that was eventually closed as a duplicate of SI-2712.

@ceedubs
Copy link
Contributor Author

ceedubs commented May 14, 2016

It appears that this isn't an issue in projects that use the SI-2712 fix plugin. I'm inclined to say that we should encourage people who are running into this sort of thing to use that plugin as opposed to pursuing too cumbersome of a workaround for this within cats.

@ceedubs
Copy link
Contributor Author

ceedubs commented Jun 18, 2016

I'm going to go ahead and close this out in favor of #1073.

@ceedubs ceedubs closed this as completed Jun 18, 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

No branches or pull requests

2 participants