<div dir="auto">David is right. This can't happen, unfortunately </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 4, 2020, 12:48 AM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I don't remember why right now, but it's moderately well-known that there is no possible Monad instance compatible with the Applicative instance for ZipList. See the answers to <a href="https://stackoverflow.com/questions/6463058/help-on-writing-the-colist-monad-exercise-from-an-idioms-intro-paper" target="_blank" rel="noreferrer">https://stackoverflow.com/questions/6463058/help-on-writing-the-colist-monad-exercise-from-an-idioms-intro-paper</a> by pigworker (Conor McBride) and C. A. McCann.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 4, 2020, 2:53 AM Dannyu NDos <<a href="mailto:ndospark320@gmail.com" target="_blank" rel="noreferrer">ndospark320@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>instance Monad ZipList where<br>    ZipList [] >>= _ = ZipList []<br>    ZipList (x:xs) >>= f = ZipList $ do<br>        let ZipList y' = f x<br>        guard (not (null y'))<br>        let ZipList ys = ZipList xs >>= ZipList . join . maybeToList . fmap snd . uncons . getZipList . f<br>        head y' : ys</div><div><br></div><div>instance MonadFail ZipList where<br>    fail _ = empty</div><div><br></div><div>instance MonadPlus ZipList</div></div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>