<div dir="ltr">That's a valid point. come to think of it, is there any use case where Void appears on a positive position?</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 13, 2019 at 1:15 AM Isaac Elliott <<a href="mailto:isaace71295@gmail.com">isaace71295@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If you had an `RWST r Void s m a`, then you would be able to produce an `m (a, s, Void)`, which is `absurd`.<br><br><div class="gmail_quote"><div dir="ltr">On Sun, 13 Jan. 2019, 6:43 pm Javran Cheng, <<a href="mailto:javran.c@gmail.com" target="_blank">javran.c@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote">(forgot to reply all, sorry)</div><div class="gmail_quote"><br><div dir="ltr"><div dir="ltr"><div>Hi Will,</div><div><br></div><div>Thanks for the reply!</div><div><br></div><div>> A monoid has an identity element, and void does not. <br></div><div><br></div><div>now I feel dull never thought about that.</div><div><br></div><div>> How would you write return with void as the writer?</div><div>> You can accomplish what you want with the free monoid over Void - i.e. [Void], which is isomorphic to unit. So unit seems like the right choice.</div><div><br></div><div>Unit does work fine, but I figure using Void is an interesting idea, as I can make sure that no one can use the "W" part of my RWST.</div><div><br></div><div>Javran</div><div><br></div></div></div></div></div><div dir="ltr"><div class="gmail_quote"><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 13, 2019 at 12:23 AM William Yager <<a href="mailto:will.yager@gmail.com" target="_blank">will.yager@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sun, Jan 13, 2019 at 4:00 PM Javran Cheng <<a href="mailto:javran.c@gmail.com" target="_blank">javran.c@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Cafe,<div><br></div><div>I'm wondering why Data.Void does not have a Monoid instance, or, what would be the problem if we do "mempty = absurd mempty"?</div></div></blockquote><div><br></div><div>This diverges, does it not?</div><div><br></div><div>A monoid has an identity element, and void does not. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Long story: I was using a monad with some transformers, then I realize I can collapse State and Reader into RWST with Void being Writer output.</div><div>(well, I could have just used Unit but I wanna give Void a try...) I know beforehand that Void is Semigroup but is a bit surprise it doesn't have Monoid instance.</div></div></blockquote><div><br></div><div>How would you write return with void as the writer?</div><div><br></div><div>You can accomplish what you want with the free monoid over Void - i.e. [Void], which is isomorphic to unit. So unit seems like the right choice.</div><div><br></div><div>--Will</div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_6640426151469186254m_3295932423828045835m_3912375629417583091gmail_signature"><div dir="ltr">Javran (Fang) Cheng<br></div></div>
</div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_6640426151469186254m_3295932423828045835gmail_signature"><div dir="ltr">Javran (Fang) Cheng<br></div></div></div>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Javran (Fang) Cheng<br></div></div>