Control.Monad.Writer found in several haskell packages

I tried to import the Control.Monad.Writer module as follows:

 import Control.Monad.Writer 

ghc version 7.4.1 gives the following error:

 Ambiguous module name `Control.Monad.Writer': it was found in multiple packages: monads-tf-0.1.0.1 mtl-2.1.1 

There is a problem with a similar problem and a workaround here .

Despite the solution given in this thread, my questions are:
Is this the standard cabal and ghc configuration?
- If so: is there a reason why the module should be in two packages by default?
- If not: what (may have happened) and can it be canceled?

If that matters: I'm working on Debian 7.3 wheezy and installed the haskell-platform package. In addition, I installed several packages using cabal install .

Thank you very much in advance!

+6
source share
1 answer

Yes, this is the "standard." The reason is the historical refactoring of the mtl package to accommodate two different styles of processing class types with several parameters, such as the MonadWriter class: family type and functional dependencies .

The mtl package retains an older approach to functional dependencies, while monads-tf uses an approach of newer types.

Since there are libraries in the Haskell ecosystem that use monads-tf , it is inevitable that both of them will end up in the package database on typical installations — I personally experienced this for several weeks.

+6
source

All Articles