cats
cats copied to clipboard
No scaladoc for `TupleNSemigroupalOps` classes (e.g. `mapN` method)?
It looks like there's no scaladoc for the various Tuple*SemigroupalOps classes - e.g. on https://typelevel.github.io/cats/api/cats/syntax/package$$apply$.html there is a link to ApplyOps documentation but not to Tuple2SemigroupalOps. And searching for mapN returns nothing. I assume that's because these classes are generated from Boilerplate.scala rather than existing directly in the codebase.
I'd say this is due to these classes being private[syntax].
Well, I'm not too concerned about the details of how it's implemented, but mapN is an important API that ought to have scaladoc available somehow.
I removed the private[syntax] and then mapN and friends appear in the scaladocs. Do you think this is the correct solution, and I should push a PR?
diff --git a/project/Boilerplate.scala b/project/Boilerplate.scala
index 338789542..20c3d9c8e 100644
--- a/project/Boilerplate.scala
+++ b/project/Boilerplate.scala
@@ -490,7 +490,7 @@ object Boilerplate {
- implicit def catsSyntaxTuple${arity}Semigroupal[F[_], ${`A..N`}]($tupleTpe): Tuple${arity}SemigroupalOps[F, ${`A..N`}] = new Tuple${arity}SemigroupalOps(t$arity)
|}
|
- -private[syntax] final class Tuple${arity}SemigroupalOps[F[_], ${`A..N`}](private val $tupleTpe) extends Serializable {
+ -final class Tuple${arity}SemigroupalOps[F[_], ${`A..N`}](private val $tupleTpe) extends Serializable {
- $map
- $contramap
- $imap

I'm not sure why the implicit classes are marked private in the first place.
Yeah I think that PR would be appreciated, I wonder why they were marked private too
Yeah I think that PR would be appreciated, I wonder why they were marked private too
Probably to prevent anyone from using them explicitly 🤷