Skip to content

Commit

Permalink
updates to RepresentableSyntax
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-jordan committed Jul 8, 2018
1 parent cff12a6 commit c31445e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/main/scala/cats/syntax/representable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ trait RepresentableSyntax {
implicit final def catsSyntaxTabulate[A, R](f: R => A): TabulateOps[A, R] =
new TabulateOps[A, R](f)

implicit final def catsSyntaxIndex[F[_], A, R](fa: F[A])(implicit R: Representable.Aux[F, R]): IndexOps[F, A, R] =
new IndexOps[F, A, R](fa)
implicit final def catsSyntaxIndex[F[_], A](fa: F[A]): IndexOps[F, A] =
new IndexOps[F, A](fa)
}

final class IndexOps[F[_], A, R](val fa: F[A]) extends AnyVal {
def index(implicit R: Representable.Aux[F, R]): R => A = R.index(fa)
final class IndexOps[F[_], A](val fa: F[A]) extends AnyVal {
def index[R](implicit R: Representable.Aux[F, R]): R => A = R.index(fa)
}

final class TabulateOps[A, R](val f: R => A) extends AnyVal {
Expand Down

0 comments on commit c31445e

Please sign in to comment.