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

make Unapply serializable #905

Merged
merged 1 commit into from
Mar 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Unapply.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package cats
* Functor for Map[A,?] for any A, and for Either[A,?] for any A,
* however the Scala compiler will not find them without some coercing.
*/
trait Unapply[TC[_[_]], MA] {
trait Unapply[TC[_[_]], MA] extends Serializable {
// a type constructor which is properly kinded for the type class
type M[_]
// the type applied to the type constructor to make an MA
Expand Down
3 changes: 3 additions & 0 deletions tests/src/test/scala/cats/tests/UnapplyTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cats
package tests

import cats.data._
import cats.laws.discipline.SerializableTests

// the things we assert here are not so much important, what is
// important is that this stuff compiles at all.
Expand All @@ -26,4 +27,6 @@ class UnapplyTests extends CatsSuite {
z should be (List(Option((1,3)), Option((1,4)),
Option((2,3)), Option((2,4))))
}

checkAll("Unapply[Functor, Option[String]]", SerializableTests.serializable(Unapply[Functor, Option[String]]))
}