Skip to content

Commit

Permalink
Merge pull request typelevel#1063 from typelevel/fix-IdT
Browse files Browse the repository at this point in the history
fix IdT
  • Loading branch information
ceedubs committed May 26, 2016
2 parents d14fc0a + 78ff38a commit 8717aeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/data/IdT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final case class IdT[F[_], A](value: F[A]) {
G.map(F.traverse(value)(f))(IdT(_))

def ap[B](f: IdT[F, A => B])(implicit F: Apply[F]): IdT[F, B] =
IdT(F.ap(value)(f.value))
IdT(F.ap(f.value)(value))

}

Expand Down
4 changes: 3 additions & 1 deletion tests/src/test/scala/cats/tests/IdTTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package cats.tests

import cats.{Foldable, Functor, Monad, Traverse}
import cats.data.IdT
import cats.laws.discipline.{FoldableTests, FunctorTests, MonadTests, SerializableTests, TraverseTests}
import cats.laws.discipline.{CartesianTests, FoldableTests, FunctorTests, MonadTests, SerializableTests, TraverseTests}
import cats.laws.discipline.arbitrary._

class IdTTests extends CatsSuite {

implicit val iso = CartesianTests.Isomorphisms.invariant[IdT[List, ?]]

checkAll("IdT[Functor, Int]", FunctorTests[IdT[List, ?]].functor[Int, Int, Int])
checkAll("Functor[IdT[List, ?]]", SerializableTests.serializable(Functor[IdT[List, ?]]))

Expand Down

0 comments on commit 8717aeb

Please sign in to comment.