Proposal: transformers/mtl Applicative Relaxation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Proposal: transformers/mtl Applicative Relaxation

chessai .
I think given AMP that transformers should use CPP to relax Monad constraints to Applicative on newer versions of base.

As an example:

except :: (Monad m) => Either e a -> ExceptT e m a
except m = ExceptT (return m)

could become

except :: (Applicative m) => Either e a -> ExceptT e m a
except m = ExceptT (pure m)

Similarly some typeclasses in mtl could do with some relaxation. A related issue: https://github.com/haskell/mtl/issues/35

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries