ekmett / kan-extensions

Kan extensions, Kan lifts, the Yoneda lemma, and (co)monads generated by a functor
Other
78 stars 33 forks source link

MonadFree instance for Co #46

Open paf31 opened 6 years ago

paf31 commented 6 years ago

There is the following instance:

instance ComonadCofree f w => MonadFree (Co f) (Co w)

Essentially, we could require only ComonadCofree g w for some g for which there is a pairing with f. But since we don't have a type class for that, and since inference would be presumably pretty horrible, I think it makes sense to just choose Co f for g.

What do you think?