
Hello, It seems to me that the "build depends" attribute/field is only informational, i.e. it doesn't cause "faulting in" dependencies if not present? If true, this seems to be a deficiency in cabal. ?? Kind regards, Vasili PS It seems to me that for HaskellDB the "build depends" is incomplete in that it should contain "old time" and "TextPrettyPrint.HughesPJ"??

cabal should access to currently installed packages from the package db.
Just thinking out loud ... a digraph of dependencies would have to be built
from "build depends" to drive possible "faulting in " ....
On Mon, Aug 18, 2008 at 3:37 AM, Galchin, Vasili
Hello,
It seems to me that the "build depends" attribute/field is only informational, i.e. it doesn't cause "faulting in" dependencies if not present? If true, this seems to be a deficiency in cabal. ??
Kind regards, Vasili
PS It seems to me that for HaskellDB the "build depends" is incomplete in that it should contain "old time" and "TextPrettyPrint.HughesPJ"??

On Mon, 18 Aug 2008, Galchin, Vasili wrote:
Hello,
It seems to me that the "build depends" attribute/field is only informational, i.e. it doesn't cause "faulting in" dependencies if not present? If true, this seems to be a deficiency in cabal. ??
At least when compiling with GHC, Cabal exposes only packages which are mentioned under Build-Depends. That is, if a package is missing in Build-Depends, the project cannot be compiled. It is however possible to forget modules in the Exposed-Modules and Other-Modules section and GHC finds them anyway.

when i run cabal i get an error message: :~/haskellSources/packages/MissingH-0.18.6$ runhaskell Setup configure Setup.hs:19:35: Couldn't match expected type `(Either GenericPackageDescription PackageDescription, HookedBuildInfo)' against inferred type `PackageDescription' In the first argument of `(confHook defaultUserHooks)', namely `mydescrip' In the expression: let mydescrip = case os of "mingw32" -> ... _ -> ... in (confHook defaultUserHooks) mydescrip flags In the definition of `customConfHook': customConfHook descrip flags = let mydescrip = ... in (confHook defaultUserHooks) mydescrip flags what is wrong? i use ghc 6.8.2 and cabal 1.2.3.0 thanks for help! andrew

Andrew U. Frank wrote:
when i run cabal i get an error message: :~/haskellSources/packages/MissingH-0.18.6$ runhaskell Setup configure
Setup.hs:19:35: Couldn't match expected type `(Either GenericPackageDescription PackageDescription, HookedBuildInfo)' against inferred type `PackageDescription' In the first argument of `(confHook defaultUserHooks)', namely `mydescrip' In the expression: let mydescrip = case os of "mingw32" -> ... _ -> ... in (confHook defaultUserHooks) mydescrip flags In the definition of `customConfHook': customConfHook descrip flags = let mydescrip = ... in (confHook defaultUserHooks) mydescrip flags
what is wrong? i use ghc 6.8.2 and cabal 1.2.3.0
Looks like you'll have to upgrade Cabal (the library). Which version exactly you need I don't know but I'd try the latest and if that fails from there on work backwards. HTH -- b32n

On Wed, 2008-08-20 at 20:53 +0200, Ben Franksen wrote:
Andrew U. Frank wrote:
when i run cabal i get an error message: :~/haskellSources/packages/MissingH-0.18.6$ runhaskell Setup configure
Setup.hs:19:35: Couldn't match expected type `(Either GenericPackageDescription PackageDescription, HookedBuildInfo)' against inferred type `PackageDescription' In the first argument of `(confHook defaultUserHooks)', namely `mydescrip' In the expression: let mydescrip = case os of "mingw32" -> ... _ -> ... in (confHook defaultUserHooks) mydescrip flags In the definition of `customConfHook': customConfHook descrip flags = let mydescrip = ... in (confHook defaultUserHooks) mydescrip flags
what is wrong? i use ghc 6.8.2 and cabal 1.2.3.0
Looks like you'll have to upgrade Cabal (the library). Which version exactly you need I don't know but I'd try the latest and if that fails from there on work backwards.
Actually it's an API change that came in in Cabal-1.2. Looking at the code in the error message it looks like you're generating a different package description based on the OS. That can now be done declaratively in the .cabal file itself using something like: library build-depends: base, blah, blah if os(windows) build-depends: Win32 cpp-options: -DDO_THE_OTHER_THING else ... Take a look in the Cabal user guide or at other .cabal files for examples. Duncan

On Mon, 2008-08-18 at 03:37 -0500, Galchin, Vasili wrote:
Hello,
It seems to me that the "build depends" attribute/field is only informational, i.e. it doesn't cause "faulting in" dependencies if not present? If true, this seems to be a deficiency in cabal. ??
I'm not quite sure what you mean. They are certainly not just informational. If you miss dependencies then the package will not compile. If by "faulting in" you mean downloading and installing missing dependencies, then that's exactly what the cabal-install tool does. As you mention in your other email, Cabal and cabal-install do indeed access the db of installed packages and build a dependency graph. cabal-install also uses a simple constraint solver to find a satisfactory dep graph of installable packages. Duncan

.
If by "faulting in" you mean downloading and installing missing dependencies, then that's exactly what the cabal-install tool does.
This is exactly by "faulting in" .. an analogy ... Installing cabal-install seems to be a chicken and egg problem if enough packages are not already installed ... if not enough then one (me) can die of a thousand paper cuts bootstrapping packages up to where cabal-install can be installed. I am running Ubuntu Linux. Cabl-install is written in Haskell? If so, is there a pre-compiled Cabal-install that I can just install with all dependencies (packages) including. I also want to install HaskellDB painlessly ;^) ??
As you mention in your other email, Cabal and cabal-install do indeed access the db of installed packages and build a dependency graph. cabal-install also uses a simple constraint solver to find a satisfactory dep graph of installable packages.
Duncan

2008/8/18 Galchin, Vasili
.
If by "faulting in" you mean downloading and installing missing dependencies, then that's exactly what the cabal-install tool does.
This is exactly by "faulting in" .. an analogy ...
Installing cabal-install seems to be a chicken and egg problem if enough packages are not already installed ... if not enough then one (me) can die of a thousand paper cuts bootstrapping packages up to where cabal-install can be installed. I am running Ubuntu Linux. Cabl-install is written in Haskell? If so, is there a pre-compiled Cabal-install that I can just install with all dependencies (packages) including. I also want to install HaskellDB painlessly ;^) ??
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you). Each of these packages can be had from hackage and they are very standard cabal installations. Sometimes you also need to upgrade cabal; I don't think this was an issue with ghc 6.8.2 and newer though. Cabal-install is worth the pain. Once you have a recent cabal-install it becomes painless to try out new packages via Hackage. And we have some very cool packages there these days. I really need to get all my side projects there so people can play with them. </advocating> Jason

On Mon, 2008-08-18 at 14:30 -0700, Jason Dagit wrote:
2008/8/18 Galchin, Vasili
: .
If by "faulting in" you mean downloading and installing missing dependencies, then that's exactly what the cabal-install tool does.
This is exactly by "faulting in" .. an analogy ...
Installing cabal-install seems to be a chicken and egg problem if enough packages are not already installed ... if not enough then one (me) can die of a thousand paper cuts bootstrapping packages up to where cabal-install can be installed. I am running Ubuntu Linux. Cabl-install is written in Haskell? If so, is there a pre-compiled Cabal-install that I can just install with all dependencies (packages) including. I also want to install HaskellDB painlessly ;^) ??
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you). Each of these packages can be had from hackage and they are very standard cabal installations. Sometimes you also need to upgrade cabal; I don't think this was an issue with ghc 6.8.2 and newer though.
Cabal-install is worth the pain. Once you have a recent cabal-install it becomes painless to try out new packages via Hackage. And we have some very cool packages there these days. I really need to get all my side projects there so people can play with them.
</advocating>
Don't forget that once you get cabal-install going the first time you can upgrade via cabal install cabal-install.

On 2008 Aug 18, at 17:30, Jason Dagit wrote:
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you). Each of these packages can be had from hackage and they are very standard cabal installations. Sometimes you also need to upgrade cabal; I don't think this was an issue with ghc 6.8.2 and newer though.
When I installed cabal-install under 6.8.2 I also had to get a Cabal 1.4 prerelease from darcs, IIRC. cabal-install would be helped a lot by either (a) being folded into Cabal, and in particular the Cabal that comes with GHC; or, failing that, (b) being available as a prebuilt bootstrap package. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Mon, 2008-08-18 at 17:41 -0400, Brandon S. Allbery KF8NH wrote:
On 2008 Aug 18, at 17:30, Jason Dagit wrote:
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you). Each of these packages can be had from hackage and they are very standard cabal installations. Sometimes you also need to upgrade cabal; I don't think this was an issue with ghc 6.8.2 and newer though.
When I installed cabal-install under 6.8.2 I also had to get a Cabal 1.4 prerelease from darcs, IIRC.
Which is now released on hackage. It's all on hackage.
cabal-install would be helped a lot by either (a) being folded into Cabal, and in particular the Cabal that comes with GHC; or, failing that, (b) being available as a prebuilt bootstrap package.
We cannot fold it into the Cabal lib package but it will come with the first Haskell Platform release. Now that the development version can re-install itself on Windows (you've no idea how painful windows makes this) I might make a pre-built .exe version available. Duncan

On Mon, 18 Aug 2008, Jason Dagit wrote:
2008/8/18 Galchin, Vasili
: If by "faulting in" you mean downloading and installing missing dependencies, then that's exactly what the cabal-install tool does.
This is exactly by "faulting in" .. an analogy ...
Installing cabal-install seems to be a chicken and egg problem if enough packages are not already installed ... if not enough then one (me) can die of a thousand paper cuts bootstrapping packages up to where cabal-install can be installed. I am running Ubuntu Linux. Cabl-install is written in Haskell? If so, is there a pre-compiled Cabal-install that I can just install with all dependencies (packages) including. I also want to install HaskellDB painlessly ;^) ??
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you).
I believe it's filepath. Actually, installing all of those packages is not so easy, because for installation of zlib you need zlib headers (zlib-devel package) and Cabal can't tell you! I think, cabal-install should be shipped in binary form, too, because compiling it manually is no fun. However, once cabal-install runs you won't like to miss it anymore.

thanks Henning. In any case, thanks to pushing I got Cabal installed. Regards, Vasili On Wed, Aug 20, 2008 at 3:04 AM, Henning Thielemann < lemming@henning-thielemann.de> wrote:
On Mon, 18 Aug 2008, Jason Dagit wrote:
2008/8/18 Galchin, Vasili
: If by "faulting in" you mean downloading and installing missing
dependencies, then that's exactly what the cabal-install tool does.
This is exactly by "faulting in" .. an analogy ...
Installing cabal-install seems to be a chicken and egg problem if enough packages are not already installed ... if not enough then one (me) can die of a thousand paper cuts bootstrapping packages up to where cabal-install can be installed. I am running Ubuntu Linux. Cabl-install is written in Haskell? If so, is there a pre-compiled Cabal-install that I can just install with all dependencies (packages) including. I also want to install HaskellDB painlessly ;^) ??
In my experience, with recent GHC there are only 3 packages needed to install cabal-install and it's pretty painless. You need zlib, HTTP and something else that I can't recall off the top of my head (but it tells you).
I believe it's filepath. Actually, installing all of those packages is not so easy, because for installation of zlib you need zlib headers (zlib-devel package) and Cabal can't tell you! I think, cabal-install should be shipped in binary form, too, because compiling it manually is no fun. However, once cabal-install runs you won't like to miss it anymore.
participants (8)
-
Andrew U. Frank
-
Ben Franksen
-
Brandon S. Allbery KF8NH
-
Derek Elkins
-
Duncan Coutts
-
Galchin, Vasili
-
Henning Thielemann
-
Jason Dagit