From 102f96363548adae27c865471c636ca68e9f6314 Mon Sep 17 00:00:00 2001 From: Andy Scott Date: Sun, 30 Apr 2017 11:31:40 -0700 Subject: [PATCH] Unseal InjectK to allow for extension by other libraries --- core/src/main/scala/cats/InjectK.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/cats/InjectK.scala b/core/src/main/scala/cats/InjectK.scala index b2c76b99058..856dd4082f9 100644 --- a/core/src/main/scala/cats/InjectK.scala +++ b/core/src/main/scala/cats/InjectK.scala @@ -9,14 +9,14 @@ import cats.data.EitherK * * @see [[http://www.staff.science.uu.nl/~swier004/publications/2008-jfp.pdf]] */ -sealed abstract class InjectK[F[_], G[_]] { +trait InjectK[F[_], G[_]] extends Serializable { def inj: FunctionK[F, G] def prj: FunctionK[G, λ[α => Option[F[α]]]] - def apply[A](fa: F[A]): G[A] = inj(fa) + final def apply[A](fa: F[A]): G[A] = inj(fa) - def unapply[A](ga: G[A]): Option[F[A]] = prj(ga) + final def unapply[A](ga: G[A]): Option[F[A]] = prj(ga) } private[cats] sealed abstract class InjectKInstances {