Skip to content

Ambiguous implicits when using project syntax #117

Open
@Voltir

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions