patch applied (packages/mtl): Add -fallow-undecidable-instances to some Control.Monad modules

Simon Peyton Jones simonpj at microsoft.com
Fri Feb 10 07:26:38 EST 2006


Thu Feb  9 04:13:34 PST 2006  simonpj at microsoft.com
  * Add -fallow-undecidable-instances to some Control.Monad modules
  
  I have recently tightened up GHC's implementation of the coverage
  condition.  As a result some of the Control.Monad modules are rejected.
  
  Example:
    class (Monad m) => MonadReader r m | m -> r where
    instance (Monoid w, MonadReader r m) => MonadReader r (WriterT w m)
  Here, fv(Writer w m) is not a superset of fv(r).
  
  The flag allows it.  I wonder if it's possible to use these modules
  to send the type cheker into a loop.
  
  

    M ./Control/Monad/Cont.hs +5
    M ./Control/Monad/Error.hs +3
    M ./Control/Monad/List.hs +3
    M ./Control/Monad/State.hs +7
    M ./Control/Monad/Writer.hs +7


More information about the Cvs-libraries mailing list