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 Vector instances #2891

Closed
durban opened this issue Jun 14, 2019 · 4 comments · Fixed by #3100
Closed

Ambiguous Vector instances #2891

durban opened this issue Jun 14, 2019 · 4 comments · Fixed by #3100
Labels
Milestone

Comments

@durban
Copy link
Contributor

durban commented Jun 14, 2019

The implicits catsKernelStdPartialOrderForVector and catsKernelStdHashForVector (here) are ambiguous if A has both PartialOrder and Hash instances, and we're looking for an Eq[Vector[A]]. (List seems to have the same problem.)

@kailuowang kailuowang added the bug label Jun 14, 2019
@kailuowang
Copy link
Contributor

I am not sure if we can fix it for Scala 2.11 without breaking BC. We might have to leave it as is on 2.11 and do a scala version specific fix for 2.12+. Or we simply drop 2.11 which is more likely now than before.

@travisbrown
Copy link
Contributor

The fix in #3100 ended up breaking bincompat (MiMa missed it), so we had to revert it for now.

@UlisesTorrella
Copy link
Contributor

Hi! I tried to replicate this error in Scala212, Scala213 and Scala3 with the following script:

import cats._

type A = String // tried also with Int, List[Int]

// checked that A has a both instances
implicitly(PartialOrder[A])
implicitly(Hash[A])

// replicate implicit ambiguity error
implicitly(Eq[Vector[A]])
implicitly(Eq[List[A]])

And got successful executions every time. Let me know if there is another situation that breaks, but otherwise the issue could be closed.

@armanbilge
Copy link
Member

Thanks!

@armanbilge armanbilge closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants