shapeless-3 icon indicating copy to clipboard operation
shapeless-3 copied to clipboard

Add K21 with an example of BifunctorK type class

Open joroKr21 opened this issue 1 year ago • 4 comments

Followup to #221

joroKr21 avatar May 11 '24 15:05 joroKr21

@milessabin I'm not sure if we would actually want to add this to the library or just close it as an experiment

joroKr21 avatar May 12 '24 08:05 joroKr21

If you have an actual use for it, then I don't see any objection to adding it, other than footprint.

This is all basically boilerplate ... could code gen be used? Then split an arbitrary number of kinds out into separate modules?

milessabin avatar May 13 '24 12:05 milessabin

If you have an actual use for it, then I don't see any objection to adding it, other than footprint.

The only use-case I can think of is in cats-tagless for https://github.com/typelevel/cats-tagless/issues/261 + https://github.com/typelevel/cats-tagless/issues/29

This is all basically boilerplate ... could code gen be used?

I think that would be the only option yeah. I don't think macros or macro annotations can work currently.

Then split an arbitrary number of kinds out into separate modules?

Do you mean like ship the boilerplate generator? As like an sbt plugin? That would be an interesting idea.

joroKr21 avatar May 13 '24 22:05 joroKr21

Do you mean like ship the boilerplate generator? As like an sbt plugin?

I didn't actually mean that, but it is an interesting idea!

milessabin avatar May 14 '24 07:05 milessabin