diff --git a/core/src/main/scala/cats/data/EitherT.scala b/core/src/main/scala/cats/data/EitherT.scala index cad914a623e..bbdc854339f 100644 --- a/core/src/main/scala/cats/data/EitherT.scala +++ b/core/src/main/scala/cats/data/EitherT.scala @@ -231,7 +231,9 @@ final case class EitherT[F[_], A, B](value: F[Either[A, B]]) { object EitherT extends EitherTInstances { - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class LeftPartiallyApplied[B](val dummy: Boolean = true ) extends AnyVal { def apply[F[_], A](fa: F[A])(implicit F: Functor[F]): EitherT[F, A, B] = EitherT(F.map(fa)(Either.left)) } @@ -247,7 +249,9 @@ object EitherT extends EitherTInstances { */ final def left[B]: LeftPartiallyApplied[B] = new LeftPartiallyApplied[B] - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class LeftTPartiallyApplied[F[_], B](val dummy: Boolean = true ) extends AnyVal { def apply[A](a: A)(implicit F: Applicative[F]): EitherT[F, A, B] = EitherT(F.pure(Either.left(a))) } @@ -263,7 +267,9 @@ object EitherT extends EitherTInstances { */ final def leftT[F[_], B]: LeftTPartiallyApplied[F, B] = new LeftTPartiallyApplied[F, B] - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class RightPartiallyApplied[A](val dummy: Boolean = true ) extends AnyVal { def apply[F[_], B](fb: F[B])(implicit F: Functor[F]): EitherT[F, A, B] = EitherT(F.map(fb)(Either.right)) } @@ -279,7 +285,9 @@ object EitherT extends EitherTInstances { */ final def right[A]: RightPartiallyApplied[A] = new RightPartiallyApplied[A] - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class PurePartiallyApplied[F[_], A](val dummy: Boolean = true ) extends AnyVal { def apply[B](b: B)(implicit F: Applicative[F]): EitherT[F, A, B] = right(F.pure(b)) } @@ -337,7 +345,9 @@ object EitherT extends EitherTInstances { */ final def fromEither[F[_]]: FromEitherPartiallyApplied[F] = new FromEitherPartiallyApplied - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class FromEitherPartiallyApplied[F[_]](val dummy: Boolean = true ) extends AnyVal { def apply[E, A](either: Either[E, A])(implicit F: Applicative[F]): EitherT[F, E, A] = EitherT(F.pure(either)) @@ -356,7 +366,9 @@ object EitherT extends EitherTInstances { */ final def fromOption[F[_]]: FromOptionPartiallyApplied[F] = new FromOptionPartiallyApplied - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class FromOptionPartiallyApplied[F[_]](val dummy: Boolean = true ) extends AnyVal { def apply[E, A](opt: Option[A], ifNone: => E)(implicit F: Applicative[F]): EitherT[F, E, A] = EitherT(F.pure(Either.fromOption(opt, ifNone))) @@ -392,7 +404,9 @@ object EitherT extends EitherTInstances { */ final def cond[F[_]]: CondPartiallyApplied[F] = new CondPartiallyApplied - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class CondPartiallyApplied[F[_]](val dummy: Boolean = true ) extends AnyVal { def apply[E, A](test: Boolean, right: => A, left: => E)(implicit F: Applicative[F]): EitherT[F, E, A] = EitherT(F.pure(Either.cond(test, right, left))) diff --git a/core/src/main/scala/cats/data/OptionT.scala b/core/src/main/scala/cats/data/OptionT.scala index b1a2e6715b5..bebf4302969 100644 --- a/core/src/main/scala/cats/data/OptionT.scala +++ b/core/src/main/scala/cats/data/OptionT.scala @@ -139,7 +139,9 @@ final case class OptionT[F[_], A](value: F[Option[A]]) { object OptionT extends OptionTInstances { - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class PurePartiallyApplied[F[_]](val dummy: Boolean = true ) extends AnyVal { def apply[A](value: A)(implicit F: Applicative[F]): OptionT[F, A] = OptionT(F.pure(Some(value))) @@ -182,7 +184,9 @@ object OptionT extends OptionTInstances { */ def fromOption[F[_]]: FromOptionPartiallyApplied[F] = new FromOptionPartiallyApplied - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class FromOptionPartiallyApplied[F[_]](val dummy: Boolean = true ) extends AnyVal { def apply[A](value: Option[A])(implicit F: Applicative[F]): OptionT[F, A] = OptionT(F.pure(value)) diff --git a/core/src/main/scala/cats/data/Validated.scala b/core/src/main/scala/cats/data/Validated.scala index 3f7e4284f55..0cb2b245cf0 100644 --- a/core/src/main/scala/cats/data/Validated.scala +++ b/core/src/main/scala/cats/data/Validated.scala @@ -260,7 +260,9 @@ object Validated extends ValidatedInstances with ValidatedFunctions{ */ def catchOnly[T >: Null <: Throwable]: CatchOnlyPartiallyApplied[T] = new CatchOnlyPartiallyApplied[T] - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[data] final class CatchOnlyPartiallyApplied[T](val dummy: Boolean = true ) extends AnyVal{ def apply[A](f: => A)(implicit T: ClassTag[T], NT: NotNull[T]): Validated[T, A] = try { diff --git a/core/src/main/scala/cats/syntax/either.scala b/core/src/main/scala/cats/syntax/either.scala index 471b3a36c05..929740a5bfb 100644 --- a/core/src/main/scala/cats/syntax/either.scala +++ b/core/src/main/scala/cats/syntax/either.scala @@ -19,7 +19,10 @@ trait EitherSyntax { } object EitherSyntax { - /** Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ + + /** + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. + */ private[syntax] final class CatchOnlyPartiallyApplied[T](val dummy: Boolean = true ) extends AnyVal { def apply[A](f: => A)(implicit CT: ClassTag[T], NT: NotNull[T]): Either[T, A] = try { diff --git a/free/src/main/scala/cats/free/Free.scala b/free/src/main/scala/cats/free/Free.scala index 7a15f03c39d..fe98ea3f2c8 100644 --- a/free/src/main/scala/cats/free/Free.scala +++ b/free/src/main/scala/cats/free/Free.scala @@ -220,8 +220,7 @@ object Free { new FreeInjectKPartiallyApplied /** - * Pre-application of an injection to a `F[A]` value. - * @param dummy is introduced solely for the sake of making this a value class and thus zero allocation cost. + * Uses the [[http://typelevel.org/cats/guidelines.html#partially-applied-type-params Partially Applied Type Params technique]] for ergonomics. */ private[free] final class FreeInjectKPartiallyApplied[F[_], G[_]](val dummy: Boolean = true ) extends AnyVal { def apply[A](fa: F[A])(implicit I: InjectK[F, G]): Free[G, A] =