Skip to content

Commit

Permalink
Add instances to companion object
Browse files Browse the repository at this point in the history
  • Loading branch information
yilinwei committed Jun 25, 2020
1 parent 6081197 commit d696164
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kernel/src/main/scala/cats/kernel/Enumerable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ trait BoundedEnumerable[@sp A] extends PartialPreviousUpperBounded[A] with Parti

}

object BoundedEnumerable {
implicit def catsKernelBoundedEnumerableForUnit: BoundedEnumerable[Unit] =
cats.kernel.instances.unit.catsKernelStdOrderForUnit
implicit def catsKernelBoundedEnumerableForBoolean: BoundedEnumerable[Boolean] =
cats.kernel.instances.boolean.catsKernelStdOrderForBoolean
implicit def catsKernelBoundedEnumerableForInt: BoundedEnumerable[Int] =
cats.kernel.instances.int.catsKernelStdOrderForInt
implicit def catsKernelBoundedEnumerableForShort: BoundedEnumerable[Short] =
cats.kernel.instances.short.catsKernelStdOrderForShort
implicit def catsKernelBoundedEnumerableForLong: BoundedEnumerable[Long] =
cats.kernel.instances.long.catsKernelStdOrderForLong
implicit def catsKernelBoundedEnumerableForChar: BoundedEnumerable[Char] =
cats.kernel.instances.char.catsKernelStdOrderForChar
}

trait LowerBoundedEnumerable[@sp A] extends PartialNextLowerBounded[A] with Next[A] {
def order: Order[A]
override def partialOrder: PartialOrder[A] = order
Expand Down

0 comments on commit d696164

Please sign in to comment.