<div dir="ltr"><span style="font-size:17.5px"><font face="monospace, monospace" style="background-color:rgb(255,242,204)">IsString str => MonadFail (Either str)</font><font style="background-color:rgb(255,255,255)" face="verdana, sans-serif"> </font><font face="verdana, sans-serif" style="background-color:rgb(255,255,255)">does make sense to me. +1</font></span><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-12 8:02 GMT+09:00 Tobias Markus <span dir="ltr"><<a href="mailto:tobias@miglix.eu" target="_blank">tobias@miglix.eu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As suggested in the GHC Trac [1], it would be nice to have a MonadFail<br>
instance for Either. The original suggestion by lexi.lambda was<br>
<br>
instance MonadFail (Either String) where<br>
fail = Left<br>
<br>
However, it was rightfully pointed out that this instance is overly<br>
specific. The discussion arrived at the following alternative proposed<br>
by Iceland_jack:<br>
<br>
instance IsString str => MonadFail (Either str) where<br>
fail = Left . fromString<br>
<br>
For previous discussion on this proposal, please take a look at the Trac<br>
thread.<br>
<br>
I am looking forward to your input!<br>
<br>
Tobias<br>
<br>
[1] GHC Trac Ticket #12160, <a href="https://ghc.haskell.org/trac/ghc/ticket/12160" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/ticket/12160</a><br>
<br>
--<br>
Tobias Markus<br>
<br>
"They who would give up essential Liberty, to purchase a little<br>
temporary Safety, deserve neither Liberty nor Safety."<br>
-- Benjamin Franklin (1706-1790)<br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/libraries</a><br>
</blockquote></div><br></div>