GHC 6.10.1 and cabal[-install]

Hello, I installed GHC 6.10.1 today and expected it to contain the cabal command line utility. Unfortunately, this was not the case. Where can I download it? How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in? http://hackage.haskell.org/ still links to cabal-install for a convenient way for installing packages. I thought that cabal-install is outdated. Isn’t it? Generally, Cabal info and documentation ist too hard to find on the web, in my opinion. Best wishes, Wolfgang

Hi, I used the cabal-install on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install In order to install it you will need these two packages first: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP-3001.1.4 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib-0.5.0.0 For each package (starting with the last two of course), run:
runghc Setup configure runghc Setup build runghc Setup install
Once its all done, you can instead use
cabal install x
to install package x, and don't need to care about dependencies anymore. And theres nothing else you need to do in order to integrate it with ghc either... /Tobias -----Original Message----- From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Wolfgang Jeltsch Sent: den 18 november 2008 11:01 To: haskell-cafe@haskell.org Subject: [Haskell-cafe] GHC 6.10.1 and cabal[-install] Hello, I installed GHC 6.10.1 today and expected it to contain the cabal command line utility. Unfortunately, this was not the case. Where can I download it? How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in? http://hackage.haskell.org/ still links to cabal-install for a convenient way for installing packages. I thought that cabal-install is outdated. Isn't it? Generally, Cabal info and documentation ist too hard to find on the web, in my opinion. Best wishes, Wolfgang _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Am Dienstag, 18. November 2008 11:01 schrieb Wolfgang Jeltsch:
Hello,
I installed GHC 6.10.1 today and expected it to contain the cabal command line utility. Unfortunately, this was not the case. Where can I download it?
Meanwhile, I found out that the package cabal-install includes the cabal command. On the other hand I thought that there was a now deprecated command line tool named cabal-install. I find this a bit confusing.
How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in?
Cabal wants to place package info in $HOME/.cabal. However, I want to install packages globally with sudo. So I want to have a global package cache. Is there a common directory to be used for that or is cabal[-install] only for per-user installations? Well, there is the --global option but it is apparently only for registering packages globally. Does it change the destination directory for the installed packages too? If yes, to what directory? Is the default --global or --user? Sorry, but I cannot find the answers to this in the docs and I don’t want to mess up my file system. Best wishes, Wolfgang

On Tue, 2008-11-18 at 14:23 +0100, Wolfgang Jeltsch wrote:
Am Dienstag, 18. November 2008 11:01 schrieb Wolfgang Jeltsch:
Hello,
I installed GHC 6.10.1 today and expected it to contain the cabal command line utility. Unfortunately, this was not the case. Where can I download it?
Meanwhile, I found out that the package cabal-install includes the cabal command. On the other hand I thought that there was a now deprecated command line tool named cabal-install. I find this a bit confusing.
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool. The deprecated package you're thinking of is cabal-get or cabal-setup.
How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in?
The defaults for user or global should be fine. There is no need to put additional packages into the ghc install tree, indeed I would recommend against doing that.
Cabal wants to place package info in $HOME/.cabal. However, I want to install packages globally with sudo. So I want to have a global package cache. Is there a common directory to be used for that or is cabal[-install] only for per-user installations?
It can do per-user or global. Per-user is the default. If you want to do the build as user and just the install as root then you can use the --global --root-cmd=sudo options. If you want to use this every time then you can set that in the ~/.cabal/config file.
Well, there is the --global option but it is apparently only for registering packages globally. Does it change the destination directory for the installed packages too?
Yes.
If yes, to what directory?
/usr/local
Is the default --global or --user?
--user
Sorry, but I cannot find the answers to this in the docs and I don’t want to mess up my file system.
The cabal user guide lists the default install directories for global and user installs. The default ~/.cabal/config file is slightly self-documenting in that it lists the available options and their defaults: [..snip..] -- user-install: True [..snip..] install-dirs user -- prefix: /home/duncan/.cabal [..snip..] install-dirs global -- prefix: /usr/local [..snip..]

Duncan Coutts wrote:
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool.
The deprecated package you're thinking of is cabal-get or cabal-setup.
Will Hackage one day provide a way to discover that one package has been superceeded by another? Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??

On Tue, Nov 18, 2008 at 1:51 PM, Andrew Coppin
Duncan Coutts wrote:
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool.
The deprecated package you're thinking of is cabal-get or cabal-setup.
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764 I think we just need someone (how about you!?) to start working on it. Thanks, Jason

Jason Dagit wrote:
On Tue, Nov 18, 2008 at 1:51 PM, Andrew Coppin
mailto:andrewcoppin@btinternet.com> wrote: Duncan Coutts wrote:
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool.
The deprecated package you're thinking of is cabal-get or cabal-setup.
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764
I think we just need someone (how about you!?) to start working on it.
What do I need to do? Just obtain the Hackage source code and submit a Darcs patch or something? Or is it harder than that?

On Tue, Nov 18, 2008 at 2:00 PM, Andrew Coppin
Jason Dagit wrote:
On Tue, Nov 18, 2008 at 1:51 PM, Andrew Coppin < andrewcoppin@btinternet.com mailto:andrewcoppin@btinternet.com> wrote:
Duncan Coutts wrote:
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool.
The deprecated package you're thinking of is cabal-get or cabal-setup.
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764
I think we just need someone (how about you!?) to start working on it.
What do I need to do? Just obtain the Hackage source code and submit a Darcs patch or something? Or is it harder than that?
A darcs patch should work. If you look in the thread I linked to you'll see this message by Thomas M. DuBuisson: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764 Where he gives the location of secret hideout for the hackage happs server and how to contribute. Thanks, Jason

On Tue, Nov 18, 2008 at 2:03 PM, Jason Dagit
On Tue, Nov 18, 2008 at 2:00 PM, Andrew Coppin < andrewcoppin@btinternet.com> wrote:
Jason Dagit wrote:
On Tue, Nov 18, 2008 at 1:51 PM, Andrew Coppin < andrewcoppin@btinternet.com mailto:andrewcoppin@btinternet.com> wrote:
Duncan Coutts wrote:
The Cabal package provides the library. The cabal-install package provides the 'cabal' command line tool.
The deprecated package you're thinking of is cabal-get or cabal-setup.
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764
I think we just need someone (how about you!?) to start working on it.
What do I need to do? Just obtain the Hackage source code and submit a Darcs patch or something? Or is it harder than that?
A darcs patch should work. If you look in the thread I linked to you'll see this message by Thomas M. DuBuisson:
By copy and paste, my apologies: http://article.gmane.org/gmane.comp.lang.haskell.cafe/46773

Jason Dagit wrote:
On Tue, Nov 18, 2008 at 2:03 PM, Jason Dagit
mailto:dagit@codersbase.com> wrote: On Tue, Nov 18, 2008 at 2:00 PM, Andrew Coppin
mailto:andrewcoppin@btinternet.com> wrote: Jason Dagit wrote:
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764
I think we just need someone (how about you!?) to start working on it.
What do I need to do? Just obtain the Hackage source code and submit a Darcs patch or something? Or is it harder than that?
A darcs patch should work. If you look in the thread I linked to you'll see this message by Thomas M. DuBuisson:
By copy and paste, my apologies: http://article.gmane.org/gmane.comp.lang.haskell.cafe/46773
Hackage ticket #261 appears to contain the required patch already. http://hackage.haskell.org/trac/hackage/ticket/261

On Tue, 2008-11-18 at 13:56 -0800, Jason Dagit wrote:
Will Hackage one day provide a way to discover that one package has been superceeded by another?
Currently you can see when a newer version of the exact same package exists, but (for example) take a took at how many gazillion database packages there are up there. Which ones are active? Which ones are obsolete? How can I tell??
This has come up before. As you can see here: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/46764
I think we just need someone (how about you!?) to start working on it.
It's even easier than that! Someone has done it already :-)
http://hackage.haskell.org/trac/hackage/ticket/261
Thu Aug 28 16:55:16 CEST 2008 Chry Cheng

On Wed, 19 Nov 2008 21:27:36 Duncan Coutts wrote:
It's even easier than that! Someone has done it already :-)
http://hackage.haskell.org/trac/hackage/ticket/261
Thu Aug 28 16:55:16 CEST 2008 Chry Cheng
* Marking packages deprecated Fixes ticket no. 261 as discussed in its annotations. Packages with "deprecated" "true" are excluded from the package list. Packages with "superseded by" tags provide links to their superseding packages in the package page.
Does "excluded from the package list" mean that deprecated packages won't show up on http://hackage.haskell.org/packages/archive/pkg-list.html ? If so, how does one go about finding and downloading deprecated packages? Rely on the search function to find the package page? How do you get a comprehensive list of the deprecated packages that have existed? Perhaps there should be a deprecated-pkg-list.html page. If being superseded implies deprecation this page is also where the superseded packages would go, with appropriate supersedes/superseded-by links between them.

On Thu, 2008-11-20 at 10:41 +1300, Daniel McAllansmith wrote:
On Wed, 19 Nov 2008 21:27:36 Duncan Coutts wrote:
It's even easier than that! Someone has done it already :-)
http://hackage.haskell.org/trac/hackage/ticket/261
Thu Aug 28 16:55:16 CEST 2008 Chry Cheng
* Marking packages deprecated Fixes ticket no. 261 as discussed in its annotations. Packages with "deprecated" "true" are excluded from the package list. Packages with "superseded by" tags provide links to their superseding packages in the package page. Does "excluded from the package list" mean that deprecated packages won't show up on http://hackage.haskell.org/packages/archive/pkg-list.html ?
As I understand it, yes.
If so, how does one go about finding and downloading deprecated packages? Rely on the search function to find the package page? How do you get a comprehensive list of the deprecated packages that have existed?
At the moment I think it would not be easy. You'd have to compare the current index with the upload log to find the hidden pages.
Perhaps there should be a deprecated-pkg-list.html page. If being superseded implies deprecation this page is also where the superseded packages would go, with appropriate supersedes/superseded-by links between them.
Sounds sensible. Duncan

Am Dienstag, 18. November 2008 22:24 schrieben Sie:
How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in?
The defaults for user or global should be fine. There is no need to put additional packages into the ghc install tree, indeed I would recommend against doing that.
Hmm, /usr/local is not so fine for me since it makes packages hard(er) to uninstall. I use stow (http://www.gnu.org/software/stow/).
Cabal wants to place package info in $HOME/.cabal. However, I want to install packages globally with sudo. So I want to have a global package cache. Is there a common directory to be used for that or is cabal[-install] only for per-user installations?
It can do per-user or global. Per-user is the default.
If you want to do the build as user and just the install as root then you can use the --global --root-cmd=sudo options. If you want to use this every time then you can set that in the ~/.cabal/config file.
I want the package cache etc. global. The problem is that with sudo, cabal still uses $HOME/.cabal where $HOME is the home directory of the ordinary user (not the one of root). Does --global change the directory for cabal configuration and the package cache to something different than $HOME/.cabal?
The cabal user guide lists the default install directories for global and user installs.
Okay, I looked at the cabal-install docs. And the only doc seems to be the output of cabal with the --help option. Best wishes, Wolfgang

On Wed, 2008-11-19 at 10:28 +0100, Wolfgang Jeltsch wrote:
Am Dienstag, 18. November 2008 22:24 schrieben Sie:
How do I install and configure it so that it is integrated best with GHC 6.10.1? For example, should cabal use some directory in the GHC tree to place compiled packages in?
The defaults for user or global should be fine. There is no need to put additional packages into the ghc install tree, indeed I would recommend against doing that.
Hmm, /usr/local is not so fine for me since it makes packages hard(er) to uninstall. I use stow (http://www.gnu.org/software/stow/).
No problem. It's only a default, the same default as ./configure systems use. Like ./configure it accepts all the usual --prefix= --libdir= --bindir etc flags, again with more-or-less the same relationships between them. It's documented in the Cabal user guide.
Cabal wants to place package info in $HOME/.cabal. However, I want to install packages globally with sudo. So I want to have a global package cache. Is there a common directory to be used for that or is cabal[-install] only for per-user installations?
It can do per-user or global. Per-user is the default.
If you want to do the build as user and just the install as root then you can use the --global --root-cmd=sudo options. If you want to use this every time then you can set that in the ~/.cabal/config file.
I want the package cache etc. global. The problem is that with sudo, cabal still uses $HOME/.cabal where $HOME is the home directory of the ordinary user (not the one of root).
If you want the package cache to be global then run it as root. Or edit your ~/.cabal/config to use a global shared dir for the package cache dir.
Does --global change the directory for cabal configuration and the package cache to something different than $HOME/.cabal?
No. But the ~/.cabal/config does specify the location of the package cache so you can make that a global dir. Perhaps I should ask what you're really trying to do, to see if there's some way we could support your use-case better. Do you have multiple users and you want to save disk space by sharing the package download cache? Perhaps we could put some recipe on how to integrate with stow on the Cabal wiki page.
The cabal user guide lists the default install directories for global and user installs.
Okay, I looked at the cabal-install docs. And the only doc seems to be the output of cabal with the --help option.
Pretty much all the stuff in the Cabal user guide applies to the cabal command line tool. There is some extra stuff in the cabal command line tool that is not yet adequately documented (ie only in --help). Duncan

On Thu, 2008-11-20 at 11:03 +0000, Duncan Coutts wrote:
On Wed, 2008-11-19 at 10:28 +0100, Wolfgang Jeltsch wrote:
The cabal user guide lists the default install directories for global and user installs.
Okay, I looked at the cabal-install docs. And the only doc seems to be the output of cabal with the --help option.
Pretty much all the stuff in the Cabal user guide applies to the cabal command line tool. There is some extra stuff in the cabal command line tool that is not yet adequately documented (ie only in --help).
By the way I should note that we would very much appreciate anyone who wants to help us improve the documentation. There is some documentation around (the user guide is quite extensive) but it does not seem to be well organised or easy to find. Similarly there are several sources that are not really intended for end-users (like the cabal-install page on the dev wiki) that are top hits on google. So clearly we need to do a better job with organising. With cabal-install we've been moving from a phase where it was under heavy development and only just usable to the point where it's nearly the tool of choice in its niche, so documentation and ease of installation, error messages are now more important than they were previously. We could really do with some help on these things as the number of people actually spending time hacking on these projects is quite small given the number of users and their (justified) demands for better docs, better defaults, ease of use, etc. Duncan
participants (6)
-
Andrew Coppin
-
Daniel McAllansmith
-
Duncan Coutts
-
Jason Dagit
-
Tobias Bexelius
-
Wolfgang Jeltsch