Skip to content

Commit

Permalink
Annotate types of remaining implicit instances, closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
adelbertc committed Feb 6, 2015
1 parent b2ef065 commit 4b52770
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/apply.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait ApplySyntax {
// TODO: use simulacrum instances eventually
implicit def applySyntax[F[_]: Apply, A](fa: F[A]) =
implicit def applySyntax[F[_]: Apply, A](fa: F[A]): ApplyOps[F, A] =
new ApplyOps[F, A](fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/bifunctor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cats.functor.Bifunctor

trait BifunctorSyntax {
// TODO: use simulacrum instances eventually
implicit def bifunctorSyntax[F[_, _]: Bifunctor, A, B](fab: F[A, B]) =
implicit def bifunctorSyntax[F[_, _]: Bifunctor, A, B](fab: F[A, B]): BifunctorOps[F, A, B] =
new BifunctorOps[F, A, B](fab)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/coflatMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait CoFlatMapSyntax {
// TODO: use simulacrum instances eventually
implicit def coflatMapSyntax[F[_]: CoFlatMap, A](fa: F[A]) =
implicit def coflatMapSyntax[F[_]: CoFlatMap, A](fa: F[A]): CoFlatMapOps[F, A] =
new CoFlatMapOps[F, A](fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/comonad.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait ComonadSyntax {
// TODO: use simulacrum instances eventually
implicit def comonadSyntax[F[_]: Comonad, A](fa: F[A]) =
implicit def comonadSyntax[F[_]: Comonad, A](fa: F[A]): ComonadOps[F, A] =
new ComonadOps[F, A](fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/contravariant.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package syntax
import cats.functor.Contravariant

trait ContravariantSyntax {
implicit def invariantSyntax[F[_]: Contravariant, A](fa: F[A]) =
implicit def invariantSyntax[F[_]: Contravariant, A](fa: F[A]): ContravariantOps[F, A] =
new ContravariantOps(fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/eq.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package syntax
import cats.macros.Ops

trait EqSyntax {
implicit def eqSyntax[A: Eq](a: A) = new EqOps[A](a)
implicit def eqSyntax[A: Eq](a: A): EqOps[A] = new EqOps[A](a)
}

class EqOps[A](lhs: A)(implicit A: Eq[A]) {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/syntax/flatMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package syntax

trait FlatMapSyntax {
// TODO: use simulacrum instances eventually
implicit def flatMapSyntax[F[_]: FlatMap, A](fa: F[A]) =
implicit def flatMapSyntax[F[_]: FlatMap, A](fa: F[A]): FlatMapOps[F, A] =
new FlatMapOps[F, A](fa)

implicit def flattenSyntax[F[_]: FlatMap, A](ffa: F[F[A]]) =
implicit def flattenSyntax[F[_]: FlatMap, A](ffa: F[F[A]]): FlattenOps[F, A] =
new FlattenOps[F, A](ffa)
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/syntax/foldable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package syntax

trait FoldableSyntax {
// TODO: use simulacrum instances eventually
implicit def foldableSyntax[F[_]: Foldable, A](fa: F[A]) =
implicit def foldableSyntax[F[_]: Foldable, A](fa: F[A]): FoldableOps[F, A] =
new FoldableOps[F, A](fa)

implicit def nestedFoldableSyntax[F[_]: Foldable, G[_], A](fga: F[G[A]]) =
implicit def nestedFoldableSyntax[F[_]: Foldable, G[_], A](fga: F[G[A]]): NestedFoldableOps[F, G, A] =
new NestedFoldableOps[F, G, A](fga)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/functor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait FunctorSyntax {
// TODO: use simulacrum instances eventually
implicit def functorSyntax[F[_]: Functor, A](fa: F[A]) =
implicit def functorSyntax[F[_]: Functor, A](fa: F[A]): FunctorOps[F, A] =
new FunctorOps[F, A](fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/invariant.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package syntax
import cats.functor.Invariant

trait InvariantSyntax {
implicit def invariantSyntax[F[_]: Invariant, A](fa: F[A]) =
implicit def invariantSyntax[F[_]: Invariant, A](fa: F[A]): InvariantOps[F, A] =
new InvariantOps(fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/monadCombine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait MonadCombineSyntax {
// TODO: use simulacrum instances eventually
implicit def nestedMonadCombineSyntax[F[_]: MonadCombine, G[_], A](fga: F[G[A]]) =
implicit def nestedMonadCombineSyntax[F[_]: MonadCombine, G[_], A](fga: F[G[A]]): NestedMonadCombineOps[F, G, A] =
new NestedMonadCombineOps[F, G, A](fga)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/monadFilter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait MonadFilterSyntax {
// TODO: use simulacrum instances eventually
implicit def monadFilterSyntax[F[_]: MonadFilter, A](fa: F[A]) =
implicit def monadFilterSyntax[F[_]: MonadFilter, A](fa: F[A]): MonadFilterOps[F, A] =
new MonadFilterOps[F, A](fa)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/order.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package syntax
import cats.macros.Ops

trait OrderSyntax {
implicit def orderSyntax[A: Order](a: A) = new OrderOps[A](a)
implicit def orderSyntax[A: Order](a: A): OrderOps[A] = new OrderOps[A](a)
}

class OrderOps[A](lhs: A)(implicit A: Order[A]) {
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/cats/syntax/partialOrder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ package syntax
import cats.macros.Ops

trait PartialOrderSyntax {
implicit def partialOrderSyntax[A: PartialOrder](a: A) = new PartialOrderOps[A](a)
implicit def partialOrderSyntax[A: PartialOrder](a: A): PartialOrderOps[A] =
new PartialOrderOps[A](a)
}

class PartialOrderOps[A](lhs: A)(implicit A: PartialOrder[A]) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/profunctor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cats.functor.Profunctor

trait ProfunctorSyntax {
// TODO: use simulacrum instances eventually
implicit def profunctorSyntax[F[_, _]: Profunctor, A, B](fab: F[A, B]) =
implicit def profunctorSyntax[F[_, _]: Profunctor, A, B](fab: F[A, B]): ProfunctorOps[F, A, B] =
new ProfunctorOps[F, A, B](fab)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/semigroup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait SemigroupSyntax {
// TODO: use simulacrum instances eventually
implicit def semigroupSyntax[A: Semigroup](a: A) =
implicit def semigroupSyntax[A: Semigroup](a: A): SemigroupOps[A] =
new SemigroupOps[A](a)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/show.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package syntax

trait ShowSyntax {
// TODO: use simulacrum instances eventually
implicit def showSyntax[A: Show](a: A) =
implicit def showSyntax[A: Show](a: A): ShowOps[A] =
new ShowOps[A](a)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/syntax/strong.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cats.functor.Strong

trait StrongSyntax {
// TODO: use simulacrum instances eventually
implicit def strongSyntax[F[_, _]: Strong, A, B](fab: F[A, B]) =
implicit def strongSyntax[F[_, _]: Strong, A, B](fab: F[A, B]): StrongOps[F, A, B] =
new StrongOps[F, A, B](fab)
}

Expand Down

0 comments on commit 4b52770

Please sign in to comment.