-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cofree monad and and applicative instances are inconsistent #36
Comments
Ack. Then we need to change the |
That does mean adding an Alternative constraint on the functor to the Applicative instance. |
So be it. =) The existing |
Fix #36: Bring Applicative instance in line with Monad
maybe https://github.com/ekmett/free/blob/b229616f6/src/Control/Comonad/Cofree.hs#L149-L155 |
Appears to be! On Tue, Dec 17, 2013 at 12:57 AM, kenji yoshida [email protected]:
|
I'm currently working on a fix. I propose that we disconnect the comonadic and monadic branches of |
I very much do not like the idea of disconnecting the two sides of Cofree. I'm ambivalent about whether we rip out the "incidental" Monad instance, etc. or split it into separate types, but pretending the class hierarchy is unrelated isn't a solution I'd accept. |
pure
andreturn
have differing results. In the case ofCofree Maybe
for instance,pure
yields an infinite string of its argument, where asreturn
yields a one-element string containing its argument.The text was updated successfully, but these errors were encountered: