[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transformers vs. mtl



Ernesto Hernández-Novich wrote:

> Laney pointed out that having both mtl and transformers installed caused
> this behaviour in ghci
> 
> Prelude> :m Control.Monad.Identity
> <no location info>:
>      Ambiguous module name `Control.Monad.Identity':
>      it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2

Yep, but anyone who askes anywhere (ie haskell-cafe of #haskell on
freenode) about this will immediately be told to use -hide-package.
The -hide-package option is a well known solution to this issue.

> He also suggested that perhaps porting explicit-exception to mtl was a
> better idea than packaging transformers.

I've brought up the mtl vs transformers issue on the haskell-cafe
mailing list where the general concensus was that transformers is
going to replace mtl in some future version of the haskell platform.

> I mailed upstream privately (I'll quote him as soon as he agrees) and he
> answered saying transformers was better, in general, than mtl. He also
> pointed out that the problem with ghci is a matter of using the proper
> command line option (-hide-package) to hide the package one does not
> want to use. There's no problem with ghc either, because one has to use
> -package to choose either.

Is it possible to make the transformers package hidden by default?
If so, packages built using cabal will still find it and user code
can still use transformers by doing -package transformers.
 
> m3g4 also thinks so, as he pointed out on IRC.

m3ga is me :-).

> I intend to ITP and package transformers tomorrow, unless anyone offers
> good reason not to.

Please investigate the possibility of hiding transformers by default.
This may require some hacking around in haskell-devscripts.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


Reply to: