Closed GrafBlutwurst closed 5 years ago
Kickly looking from my phone. This looks good, but it needs at least a test for the contravariant case (what about an interpreter for Show
?)
Good Idea. I was looking for a contravariant functor but couldn't come up with an example. show is great.
the encoding of Option[A]
as A \/ Unit
does not yield very pretty results.
the encoding of
Option[A]
asA \/ Unit
does not yield very pretty results.
Mind sharing an example?
Frankly I'm also not quite happy with having to interject these generic derivations through inheritance. But I haven't found a good way to pass in the module in another way
I think we're hitting the limit of scalac I only got the scala compiler to shut up by expicitly disabling erasure warning though. regular patterns are not possible because the compiler cannot infer the types correctly and adding the types by hand triggers erasure warnings.