Give MonadTrans a QuantifiedConstraints superclass

Baldur Blöndal baldurpet at
Wed Jun 2 01:52:41 UTC 2021

This is to advertise the proposal
( to add a
superclass to the MonadTrans type class in Control.Monad.Trans.

A Monad transformer 'trans' lifts a 'Monad m' to a 'Monad (trans m)'.

This proposal code-ifies that with a superclass constraint:

    class (forall m. Monad m => Monad (trans m)) => MonadTrans trans where

This is the main motiviating example of the Quantified Class
Constraints paper

More information about the Libraries mailing list