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

Ambiguous implicits when using project syntax #117

Open
Voltir opened this issue Jun 25, 2019 · 1 comment
Open

Ambiguous implicits when using project syntax #117

Voltir opened this issue Jun 25, 2019 · 1 comment

Comments

@Voltir
Copy link
Contributor

Voltir commented Jun 25, 2019

In trying to upgrade from 0.6 to 0.7, I was using _.project in various places to unwrap a single level of a pattern functor - that now fails with errors like:

[error]  found   : x$3.type (with underlying type datum.patterns.data.Data)
[error]  required: ?{def project: ?}
[error] Note that implicit conversions are not applicable because they are ambiguous:
[error]  both method toProjectSyntaxOps in trait ProjectSyntax of type [F[_], T](t: T)(implicit PFT: higherkindness.droste.Project[F,T])higherkindness.droste.syntax.ProjectSyntax.ProjectOps[F,T]
[error]  and method toFoldableProjectSyntaxOps in trait ProjectSyntax of type [F[_], T](t: T)(implicit PFT: higherkindness.droste.Project[F,T], implicit FF: cats.Foldable[F])higherkindness.droste.syntax.ProjectSyntax.ProjectFoldableOps[F,T]
[error]  are possible conversion functions from x$3.type to ?{def project: ?}

Looking at the trait ProjectSyntax, perhaps it could be resolved using the LowPriorityImplicitTrait trick to make one of the implicit take precedence over the other?

@justjoheinz
Copy link

Can confirm this on 0.8.0.

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