
On Wed, Jun 10, 2015 at 8:46 AM, Herbert Valerio Riedel
{-# LANGUAGE ConstraintKinds #-} type MonadFail m = (Fail m, Monad m) type ApplicativeFail m = (Fail m, Applicative m)
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 class (Monad m, Fail m) => MonadFail m instance (Monad m, Fail m) => MonadFail m etc. 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. -Edward
_______________________________________________
Libraries mailing list
Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries