mtl and transformers

Hi, when I cabal-installed the iteratee package, the transformers package was also installed as a dependency. Now when I run applications that import Control.Monad.Transformers I get this: Could not find module `Control.Monad.Trans': it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2 What's the work around for situations like this? Günther

Günther Schmidt
Could not find module `Control.Monad.Trans': it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2
There's a way of specifying it at the top of whichever file you're using, but so far my workaround in this situation is to use "ghc-pkg hide" on whichever of those packages I don't use in my code. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi Ivan, ghc-pkg hide works fine, thanks! Günther Am 11.01.10 03:49, schrieb Ivan Lazar Miljenovic:
Günther Schmidt
writes: Could not find module `Control.Monad.Trans': it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2
There's a way of specifying it at the top of whichever file you're using, but so far my workaround in this situation is to use "ghc-pkg hide" on whichever of those packages I don't use in my code.

Günther Schmidt:
Could not find module `Control.Monad.Trans': it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2
Ivan Lazar Miljenovic:
There's a way of specifying it at the top of whichever file you're using, but so far my workaround in this situation is to use "ghc-pkg hide" on whichever of those packages I don't use in my code.
Günther Schmidt:
ghc-pkg hide works fine, thanks!
As an alternative, you can use `LANGUAGE PackageImports' pragma: | {-# LANGUAGE PackageImports #-} | | import "transformers" Control.Monad.Trans See http://thread.gmane.org/gmane.comp.lang.haskell.libraries/12134/focus=12155 PS: Have fun with iteratees! -- vvv

Günther Schmidt wrote:
Hi,
when I cabal-installed the iteratee package, the transformers package was also installed as a dependency.
Now when I run applications that import Control.Monad.Transformers I get this:
Could not find module `Control.Monad.Trans': it was found in multiple packages: transformers-0.1.4.0 mtl-1.1.0.2
Another solution is to build your applications using Cabal and specify your dependency on mtl in the cabal file. HTH, Martijn.

Martijn van Steenbergen
Another solution is to build your applications using Cabal and specify your dependency on mtl in the cabal file.
But until we have "cabal ghci", this completely fails for actual hacking purposes... -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Ivan Lazar Miljenovic wrote:
Martijn van Steenbergen
writes: Another solution is to build your applications using Cabal and specify your dependency on mtl in the cabal file.
But until we have "cabal ghci", this completely fails for actual hacking purposes...
Just do cabal build -v, then cut and paste the ghc --make command-line and replace --make with --interactive. Obviously rather a hack, but remarkably usable in practice, in my experience. Ganesh =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ===============================================================================

On Mon, Jan 11, 2010 at 10:16 AM, Sittampalam, Ganesh
Ivan Lazar Miljenovic wrote:
Martijn van Steenbergen
writes: Another solution is to build your applications using Cabal and specify your dependency on mtl in the cabal file.
But until we have "cabal ghci", this completely fails for actual hacking purposes...
Just do cabal build -v, then cut and paste the ghc --make command-line and replace --make with --interactive.
Thanks for this tip! I always make a ghci.sh bash script in each of my projects that calls "ghci -hide-all-packages -package x -package y -package z". However a "cabal ghci" or "cabal interactive" command that does this automatically would be ideal. I see there already is a ticket[1] about it. regards, Bas [1] http://hackage.haskell.org/trac/hackage/ticket/382

Bas van Dijk
I always make a ghci.sh bash script in each of my projects that calls "ghci -hide-all-packages -package x -package y -package z". However a "cabal ghci" or "cabal interactive" command that does this automatically would be ideal. I see there already is a ticket[1] about it.
regards, Bas
Shell script can be replaced with .ghci file. See http://neilmitchell.blogspot.com/2010/01/using-ghci-files-to-run-projects.ht... (Just my two cents.) -- vvv
participants (6)
-
Bas van Dijk
-
Günther Schmidt
-
Ivan Lazar Miljenovic
-
Martijn van Steenbergen
-
Sittampalam, Ganesh
-
Valery V. Vorotyntsev