Using Cabal for dependancies

Hi, The Yhc compiler depends on an increasingly large number of Cabal packages - mtl and FilePath at the moment, but soon thats likely to increase by at least 3. Cabal is not yet mature enough to compile Yhc, and fitting in a compile of bits with Cabal will be quite hard because of the existing complexity in Scons. So what we'd really like to do is be able to call "cabal check-its-installed FilePath", which would return an appropriate exit code. If it wasn't installed then a darcs get, followed by a "cabal install-it-please" would be very handy. Does cabal-install provide the necessary bits for this? What is the result of installing a package that is already installed? How long til this kind of solution will be widely enough deployed that we can actually use it? Does anyone else have any other suggestions? Thanks Neil

On Jan 14, 2007, at 18:53 , Neil Mitchell wrote:
Hi,
The Yhc compiler depends on an increasingly large number of Cabal packages - mtl and FilePath at the moment, but soon thats likely to increase by at least 3. Cabal is not yet mature enough to compile Yhc, and fitting in a compile of bits with Cabal will be quite hard because of the existing complexity in Scons.
So what we'd really like to do is be able to call "cabal check-its-installed FilePath", which would return an appropriate exit code. If it wasn't installed then a darcs get, followed by a "cabal install-it-please" would be very handy.
Does cabal-install provide the necessary bits for this? What is the result of installing a package that is already installed? How long til this kind of solution will be widely enough deployed that we can actually use it? Does anyone else have any other suggestions?
I think that cabal-install can do what you want already (except the darcs get, it downloads a tarball from Hackage instead). Give it a try and report any problems. /Björn

Hi Bjorn, After going through pain with dependancy hell (like .dll hell, but cross platform) I finally got cabal-install to build. The list command looked most interesting, but: D:\sources\contrib\Cabal\cabal-install>cabal-install list configure: searching for ghc in path. configure: found ghc at C:\ghc\ghc-6.4.2\bin\ghc.exe "C:\ghc\ghc-6.4.2\bin\ghc.exe" --numeric-version >tmp2296 configure: looking for package tool: ghc-pkg near compiler in C:\ghc\ghc-6.4.2\b in configure: found package tool in C:\ghc\ghc-6.4.2\bin\ghc-pkg.exe cabal-install: No valid config dir found! cabal-install emit also gives the same error. Thanks Neil

On Jan 15, 2007, at 14:43 , Neil Mitchell wrote:
Hi Bjorn,
After going through pain with dependancy hell (like .dll hell, but cross platform) I finally got cabal-install to build.
The list command looked most interesting, but:
D:\sources\contrib\Cabal\cabal-install>cabal-install list configure: searching for ghc in path. configure: found ghc at C:\ghc\ghc-6.4.2\bin\ghc.exe "C:\ghc\ghc-6.4.2\bin\ghc.exe" --numeric-version >tmp2296 configure: looking for package tool: ghc-pkg near compiler in C:\ghc \ghc-6.4.2\b in configure: found package tool in C:\ghc\ghc-6.4.2\bin\ghc-pkg.exe cabal-install: No valid config dir found!
cabal-install emit also gives the same error.
Ah, Windows. I meant to ask you to test cabal-install on Windows at
the hackathon, but I didn't get that far. I think that it is looking
for /etc/cabal-install, which you probably don't have. I should set
up GHC in my Windows VM and get it working. You could try --config-
dir=
participants (2)
-
Bjorn Bringert
-
Neil Mitchell