<p dir="ltr">You can't do that; sorry. You can always turn a string into an IOException if you like. Or you could write a wrapper around IO. But MonadError has a functional dependency, so you can only have one error type per monad.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 14, 2016 6:19 PM, "Corentin Dupont" <<a href="mailto:corentin.dupont@gmail.com">corentin.dupont@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br></div>IO is an instance of MonadError IOException...<br></div>However I also need to make it an instance of MonadError String...<br></div>Is it possible?<br><div><div><div><div><div>I'm trying to instanciate this class:<br><span style="font-family:monospace,monospace"><br>class (Typeable n, Monad n, Applicative n, MonadError String n) => EvMgt n where ...<br><br></span></div><div><span style="font-family:monospace,monospace">instance EvMgt IO where...</span><br><br></div><div>Any idea?<br></div></div></div></div></div></div>
<br>_______________________________________________<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.<br></blockquote></div><br></div>