Could iteratee depend on mtl instead of transformers?

Sittampalam, Ganesh ganesh.sittampalam at
Tue Nov 24 05:26:56 EST 2009

Ross Paterson wrote:

> But there's a problem:   
> even if we rename the modules in monads-fd, we still have two modules
> in transformers that have the same names as modules in mtl, namely
> Control.Monad.Identity and Control.Monad.Trans.  Renaming isn't an  
> option: at least the first of those is the Right Name for the module
> concerned.  People who build with cabal are fine: only the dependent
> packages are exposed, and all packages use the same type
> constructors, so the interfaces are compatible.  But people who build
> with ghci or ghc --make will get the error message at the top of this
> thread:     
>     Could not find module `Control.Monad.Identity':
>       it was found in multiple packages: mtl-2.0 transformers-

This is annoying, but can be worked around with -hide-package. We could
also deprecate mtl as part of the migration, encouraging people to move
away from it as quickly as possible. After a bit it could be removed
from the platform, which would mean that people would only end up with
it on their systems if they install it or something that still depends
on it.

> So I think we're back at the original plan: a big bang replacement of
> dependencies on mtl with dependencies on transformers and monads-fd.

I'd still favour doing things more gradually.

> (Unless we introduce virtual packages.) 

What functionality would virtual packages have? Presumably in this
instance they'd need to provide some mechanism for GHC to recognise that
you get the same result by importing the modules from either source.



 Please access the attached hyperlink for an important electronic communications disclaimer: 

More information about the Libraries mailing list