Re: MTL vs Transformers
Hi Erik. Em Sex, 2009-11-27 às 18:01 +1100, Erik de Castro Lopo escreveu: (...) The obvious solution is to modify haskell-devscripts so that when it calls ghc, it uses -hide-all-packages and then explicity adds in the required packages using the -package option. Does this make sense? I think it does. If so, I can take a look at haskell-devscripts and see if I can implement this new behaviour. Take a look at hlibrary.mk. I'm just not sure about how you'll get the list of needed packages. Greetings. (...) -- marcot http://marcot.iaaeee.org/ -- To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: MTL vs Transformers
Hi, Am Freitag, den 27.11.2009, 22:12 +1100 schrieb Erik de Castro Lopo: Joachim Breitner wrote: you are only talking about calls to ghc by haskell-devscripts, e.g. when compiling Setup.hs, right? Then I agree with you. Yes. This can be fixed in the line for setup in Setup.lhs Setup.hs; do if test -e $$setup; then ghc6 --make $$setup -o $(DEB_SETUP_BIN_NAME); exit 0; fi; done in hlibrary.mk, by hiding mtl. OTOH, I wonder how many Setup scripts actually include Control.Monad.Trans – probably none, and no change is required? The calls to ghc for building the libraries themselves should handle this via cabal, shoudn’t they? Yes, and I actually think I have a very simple solution that I'm currently testing, adding: DEB_SETUP_GHC6_CONFIGURE_ARGS = --flags=-hide-package mtl or DEB_SETUP_GHC6_CONFIGURE_ARGS = --flags=-hide-package transformers to the debian/rules as required. I might be wrong, but I thought that cabal already hides all packages not explicitly mentioned in the cabal file, so nothing breaks here either. Seems to me that no action is necessary at all... or am I missing something? Greetings, Joachim -- Joachim nomeata Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: MTL vs Transformers
Joachim Breitner wrote: I might be wrong, but I thought that cabal already hides all packages not explicitly mentioned in the cabal file, so nothing breaks here either. Seems to me that no action is necessary at all... or am I missing something? Actually, I think I was miss remembering the problem I had. Over the last several of months I had run into the mtl vs transformers problem a couple of times and forgot what the actual problem was. Then when I found the solution (package hiding) I thought that solution needed to be applied to the packages themselves, which turns out not to be the case. Unfortunately I now forget how I triggered the problem to begin with. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ -- To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: MTL vs Transformers
Another alternative is to simply force the user to explicitly select the appropriate package in the source code, with the syntax: import mtl Control.Monad.Trans Ugly, but the packaging is easier. On Thu, Nov 26, 2009 at 11:01 PM, Erik de Castro Lopo mle...@mega-nerd.commle%2...@mega-nerd.com wrote: Hi all, Apparently the Haskell Platform is transitioning from one implementation of monad transformers (MTL) to another implementation (Transformers). http://hackage.haskell.org/package/mtl http://hackage.haskell.org/package/transformers I have a preliminary package for Transformers but have noticed a problem; both MTL and Transformers provide a module named (eg Control.Monad.Trans). The symptom of this problem is that when both are installed ghc can't figure out which version of Control.Monad.Trans to use. When just using ghc directly, this problem can be overcome using the -hide-all-packages and then explicity adding packages back in using the -package option (this is also the solution that cabal-install uses). The above solution however does not work when debian packages for mtl and transformers are both installed and a new debian package is being built that depends on one of these transformers libraries. The obvious solution is to modify haskell-devscripts so that when it calls ghc, it uses -hide-all-packages and then explicity adds in the required packages using the -package option. Does this make sense? If so, I can take a look at haskell-devscripts and see if I can implement this new behaviour. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ -- To UNSUBSCRIBE, email to debian-haskell-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org