[Haskell-cafe] MTL vs Transformers?

Erik de Castro Lopo mle+hs at mega-nerd.com
Mon Oct 12 22:05:06 EDT 2009

Gregory Crosswhite wrote:

> Are running into problems because you need to refer to both packages  
> (e.g., mtl and transformers) within your code, or because you are  
> using packages that refer to each? 

The later. Iteratee uses Transformers and just about everything else
I want to use uses MTL.

> Because as long as you only need  
> to refer to one of them in your own code, GHC should be able to handle  
> the dependencies for the other packages correctly.  (Hiding the  
> package only removes it from being automatically imported by your own  
> code, it doesn't prevent it from being used by other packages that  
> link to it.)

That all seems a little hackish.

However after reading the hackage descriptions of both Transformers and
MTL, it seems that they share a very similar heritage. I therefore hacked
the iteratee.cabal file and replaced the build-depends on transformers
with one on mtl and the package built quite happily. I'll play with it
a bit to see if its working correctly.

Erik de Castro Lopo

More information about the Haskell-Cafe mailing list