Skip to content

Commit

Permalink
Close #194 - [refined4s-cats] Add derivedOrder to have the instance o…
Browse files Browse the repository at this point in the history
…f Order[A] derived from Coercible[A, B] and Order[B]
  • Loading branch information
kevin-lee committed Dec 29, 2023
1 parent af5a557 commit 94e017d
Show file tree
Hide file tree
Showing 2 changed files with 568 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ trait auto {
inline given derivedEq[A, B](using coercible: Coercible[A, B], eqB: Eq[B]): Eq[A] =
refined4s.modules.cats.syntax.contraCoercible(eqB)

inline given derivedOrder[A, B](using coercible: Coercible[A, B], orderB: Order[B]): Order[A] =
refined4s.modules.cats.syntax.contraCoercible(orderB)

inline given derivedShow[A, B](using coercible: Coercible[A, B], showB: Show[B]): Show[A] =
refined4s.modules.cats.syntax.contraCoercible(showB)

Expand Down
Loading

0 comments on commit 94e017d

Please sign in to comment.