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

Provide BoundedEnumerable[Byte] instance #3756

Closed
ashleymercer opened this issue Jan 30, 2021 · 2 comments · Fixed by #3759
Closed

Provide BoundedEnumerable[Byte] instance #3756

ashleymercer opened this issue Jan 30, 2021 · 2 comments · Fixed by #3759

Comments

@ashleymercer
Copy link
Contributor

ashleymercer commented Jan 30, 2021

Following on from typelevel/cats-collections#315 it seems that there is no BoundedEnumerable[Byte] instance but I think it should be easy to provide (following the same pattern as Int, Long and so on).

I'm happy to try to put together a PR for this, although might need some guidance on binary compatibility if it's an issue, since the obvious fix would be to make:

implicit val catsKernelStdOrderForByte: Order[Byte] with Hash[Byte] with LowerBounded[Byte] with UpperBounded[Byte]

into

implicit val catsKernelStdOrderForByte: Order[Byte] with Hash[Byte] with BoundedEnumerable[Byte]
@rossabaker
Copy link
Member

I think that will be binary compatible. Trying it and running mimaReportBinaryIssues is the way to be sure.

If it doesn't work, a strategy I've used before is to make the old value explicit and deprecated, and create the new implicit that you want. But I don't anticipate that being necessary here.

@ashleymercer
Copy link
Contributor Author

@rossabaker mimaReportBinaryIssues came back clean so we should be good to go - thanks :)

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

Successfully merging a pull request may close this issue.

2 participants