Proposal: transformers/mtl Applicative Relaxation

chessai . chessai1996 at gmail.com
Sun Feb 10 18:12:57 UTC 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190210/8fd0ffbd/attachment.html>


More information about the Libraries mailing list