Closed neko-kai closed 11 years ago
I don't think so. This was actually flipped the other way around rather deliberately.
There are 58 reverse dependencies of semigroups
, and 41 on comonad
, but only 8 reverse dependencies on pointed
.
Something has to sit on the outside, and pointed
drew the short straw, because for the most part its the least useful abstraction: The problem with Copointed
(and Pointed
) in general is that the only law it offers is a free theorem, so almost any code that is written generically in terms of Copointed
(Pointed
) requires one-off reasoning about the particular instance -- it simply provides a convenient ad hoc overloading for an family of algebras (coalgebras).
You some times need just that, but for every one of those, someone else writes foldMap point
.
Flipping this would mean that I get a whole lot more complaints wanting the exact opposite request and favor the less useful abstraction.
Could comonads/semigroups depend on pointed, not the other way around? We'd like to use Copointed in monad-control, but the amount of dependencies prevents adoption.