@@ -626,8 +626,8 @@ object Boilerplate {
626626 |package syntax
627627 |
628628 |trait FunctionApplySyntax {
629- | implicit def catsSyntaxFunction1Apply[T, A0](f: Function1[A0, T]): Function1ApplyOps[T, A0] = new Function1ApplyOps(f)
630- - implicit def catsSyntaxFunction ${arity}Apply[T, ${`A..N`}](f: $function): Function ${arity}ApplyOps[T, ${`A..N`}] = new Function ${arity}ApplyOps(f)
629+ | def catsSyntaxFunction1Apply[T, A0](f: Function1[A0, T]): Function1ApplyOps[T, A0] = new Function1ApplyOps(f)
630+ - def catsSyntaxFunction ${arity}Apply[T, ${`A..N`}](f: $function): Function ${arity}ApplyOps[T, ${`A..N`}] = new Function ${arity}ApplyOps(f)
631631 |}
632632 |
633633 |private[syntax] final class Function1ApplyOps[T, A0](private val f: Function1[A0, T]) extends AnyVal with Serializable {
@@ -637,7 +637,7 @@ object Boilerplate {
637637 |
638638 -private[syntax] final class Function ${arity}ApplyOps[T, ${`A..N`}](private val f: $function) extends AnyVal with Serializable {
639639 - def liftN[F[_]: Functor: Semigroupal]( $typedParams): F[T] = Semigroupal.map $arity( ${`a..n`})(f)
640- - private[syntax] def parLiftN[F[_]: Parallel]( $typedParams): F[T] = Parallel.parMap $arity( ${`a..n`})(f)
640+ - def parLiftN[F[_]: Parallel]( $typedParams): F[T] = Parallel.parMap $arity( ${`a..n`})(f)
641641 -}
642642 """
643643 }
@@ -655,18 +655,22 @@ object Boilerplate {
655655
656656 val typedParams = synVals.zip(synTypes).map { case (v, t) => s " $v: F[ $t] " }.mkString(" , " )
657657
658- // arity 1 left out intentionally, for it's part of GenFunctionSyntax already.
659- // SyntaxSuite ensures that it exists.
660-
661658 block """
662659 |package cats
663660 |package syntax
664661 |
665662 |trait FunctionApplySyntax2 {
663+ | implicit def catsSyntaxFunction1Apply2[T, A0](f: Function1[A0, T]): Function1ApplyOps2[T, A0] = new Function1ApplyOps2(f)
666664 - implicit def catsSyntaxFunction ${arity}Apply2[T, ${`A..N`}](f: $function): Function ${arity}ApplyOps2[T, ${`A..N`}] = new Function ${arity}ApplyOps2(f)
667665 |}
666+ |
667+ |private[syntax] final class Function1ApplyOps2[T, A0](private val f: Function1[A0, T]) extends AnyVal with Serializable {
668+ | def liftN[F[_]: Functor](a0: F[A0]): F[T] = Functor[F].map(a0)(f)
669+ | def parLiftN[F[_]: Functor](a0: F[A0]): F[T] = Functor[F].map(a0)(f)
670+ |}
668671 |
669672 -private[syntax] final class Function ${arity}ApplyOps2[T, ${`A..N`}](private val f: $function) extends AnyVal with Serializable {
673+ - def liftN[F[_]: Functor: Semigroupal]( $typedParams): F[T] = Semigroupal.map $arity( ${`a..n`})(f)
670674 - def parLiftN[F[_]: NonEmptyParallel]( $typedParams): F[T] = Parallel.parMap $arity( ${`a..n`})(f)
671675 -}
672676 """
0 commit comments