Skip to content

Commit

Permalink
Merge pull request #597 from fthomas/topic/less-bimonad-laws
Browse files Browse the repository at this point in the history
Remove Bimonad law: F.pure(F.extract(fa)) <-> fa
  • Loading branch information
ceedubs committed Nov 5, 2015
2 parents 8e1214d + 05c2c87 commit e8435bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions laws/src/main/scala/cats/laws/BimonadLaws.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ trait BimonadLaws[F[_]] extends MonadLaws[F] with ComonadLaws[F] {
def pureExtractIsId[A](a: A): IsEq[A] =
F.extract(F.pure(a)) <-> a

def extractPureIsId[A](fa: F[A]): IsEq[F[A]] =
F.pure(F.extract(fa)) <-> fa

def extractFlatMapEntwining[A](ffa: F[F[A]]): IsEq[A] =
F.extract(F.flatten(ffa)) <-> F.extract(F.map(ffa)(F.extract))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ trait BimonadTests[F[_]] extends MonadTests[F] with ComonadTests[F] {
def parents: Seq[RuleSet] = Seq(monad[A, B, C], comonad[A, B, C])
def props: Seq[(String, Prop)] = Seq(
"pure andThen extract = id" -> forAll(laws.pureExtractIsId[A] _),
"extract andThen pure = id" -> forAll(laws.extractPureIsId[A] _),
"extract/flatMap entwining" -> forAll(laws.extractFlatMapEntwining[A] _),
"pure/coflatMap entwining" -> forAll(laws.pureCoflatMapEntwining[A] _)
)
Expand Down

0 comments on commit e8435bd

Please sign in to comment.