<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 10, 2015 at 8:46 AM, Herbert Valerio Riedel <span dir="ltr"><<a href="mailto:hvr@gnu.org" target="_blank">hvr@gnu.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> {-# LANGUAGE ConstraintKinds #-}<br>
type MonadFail m = (Fail m, Monad m)<br>
type ApplicativeFail m = (Fail m, Applicative m)</blockquote><div><br></div><div>If we're forced into a situation where we need to factor it into a separate class and build aliases like this, then switching to undecidable instances and encoding that as</div><div><br></div><div>class (Monad m, Fail m) => MonadFail m</div><div>instance (Monad m, Fail m) => MonadFail m</div><div><br></div><div>etc.</div><div><br></div><div>would be much better than using the ConstraintKinds extension and a type alias. The type synonym you gave doesn't let you use "MonadFail" as a first class inhabitant of kind (* -> *) -> Constraint, you can only pass it once it has been applied to an `m`. This rules out many useful type level tricks.</div><div><br></div><div>-Edward</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="color:rgb(80,0,80)">______________________________</span><span style="color:rgb(80,0,80)">_________________</span><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
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" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div></div>