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

[refined4s-cats] Add derivedOrder to have the instance of Order[A] derived from Coercible[A, B] and Order[B] #194

Closed
kevin-lee opened this issue Dec 29, 2023 · 0 comments · Fixed by #195
Assignees
Labels
Milestone

Comments

@kevin-lee
Copy link
Owner

Summary

[refined4s-cats] Add derivedOrder to have the instance of Order[A] derived from Coercible[A, B] and Order[B]

Version

0.6.0

Description

Given

import refined4s.*

type MyNum = MyNum.Type
object MyNum extends Newtype[Int]
import cats.*

val n1 = MyNum(1)
val n2 = MyNum(2)

Order[MyNum].compare(n1, n2)
// Int = -1
@kevin-lee kevin-lee added the task label Dec 29, 2023
@kevin-lee kevin-lee added this to the m7 milestone Dec 29, 2023
@kevin-lee kevin-lee self-assigned this Dec 29, 2023
kevin-lee added a commit that referenced this issue Dec 29, 2023
…f Order[A] derived from Coercible[A, B] and Order[B]
kevin-lee added a commit that referenced this issue Dec 29, 2023
…f Order[A] derived from Coercible[A, B] and Order[B]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant