Skip to content

Commit

Permalink
fix Kleisli instance and Cokleisli instance
Browse files Browse the repository at this point in the history
  • Loading branch information
kailuowang committed Dec 6, 2017
1 parent 7baba51 commit d3ac25c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions core/src/main/scala/cats/data/Cokleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ private trait CokleisliArrow[F[_]] extends Arrow[Cokleisli[F, ?, ?]] with Coklei
def lift[A, B](f: A => B): Cokleisli[F, A, B] =
Cokleisli(fa => f(F.extract(fa)))

def id[A]: Cokleisli[F, A, A] =
Cokleisli(fa => F.extract(fa))

def first[A, B, C](fa: Cokleisli[F, A, B]): Cokleisli[F, (A, C), (B, C)] =
fa.first[C]

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/Kleisli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private[data] trait KleisliChoice[F[_]] extends Choice[Kleisli[F, ?, ?]] with Kl
private[data] trait KleisliCategory[F[_]] extends Category[Kleisli[F, ?, ?]] with KleisliCompose[F] {
implicit def F: Monad[F]

def id[A]: Kleisli[F, A, A] = Kleisli.ask[F, A]
override def id[A]: Kleisli[F, A, A] = Kleisli.ask[F, A]
}

private[data] trait KleisliCompose[F[_]] extends Compose[Kleisli[F, ?, ?]] {
Expand Down

0 comments on commit d3ac25c

Please sign in to comment.