> Why can I get from every Comonad an Monad, bu...
# arrow
i
Why can I get from every Comonad an Monad, but not the other way around?
essentially, I want to figure out when we have a Monad and a Comonad for free. Why can’t we get a Bimonad, too?
s
Because they're not the same? I can extract the value from
Id
but not from
Option
, hence Id has a Comonad and Option doesn't.
i
makes sense, but are there any groups of categories where we can enforce this or at least derive that?
s
Enforce what?
i
X is a Comonad -> there is a Monad -> thus there is a Bimonad
r
Derivation will be nicer with compiler plugins but at the moment is better to specialize the implementations
👍🏽 1
m
I think not every Comonad can give a Monad too
For example the Day datatype cannot provide an instance for Monad
But maybe I am wrong as I coded that datatype myself and couldn't see how to provide an implementation for flatMap
i
I am trying to understand this https://hackage.haskell.org/package/kan-extensions-5.2/docs/Control-Monad-Co.html essentially Co introduces the later — to get a Monad from a Comonad. For me cat theory always takes time to digest 😅
m
I left that datatype Todo after I could write an example using every datatype from arrow-ui and have a better understanding of Comonads