
People, I have ghc-7.4.0.20111219 made from source and tested it on the DoCon-2.12 application -- thanks to people for their help! It looks all right. This was -- with skipping the module Random. Now it remains to add the Random package. I have taken AC-Random Version 0.1 from hackage. Its installation requires Cabal:
which cabal cabal: Command not found.
And Cabal is difficult to install, it reports that such and such package versions are missing. On the other hand, Cabal is, probably, present inside ghc-7.4.0.20111219, somewhere in the installation directory. Thus I see its .a and .o files in ~/ghc/7.4.1pre/inst0/lib/ghc-7.4.0.20111219/Cabal-1.14.0/ Can you, please, tell me what is the simplest way to install Random in this situation? Thank you in advance for your explanation, ------ Sergei mechvel@botik.ru

Serge D. Mechveliani wrote:
I have ghc-7.4.0.20111219 made from source and tested it on the DoCon-2.12 application -- thanks to people for their help! It looks all right. This was -- with skipping the module Random Now it remains to add the Random package. I have taken AC-Random Version 0.1 from hackage... Its installation requires Cabal.. And Cabal is difficult to install..
Glad to hear that you are working on getting DoCon working again in a modern Haskell environment. I hope you will be successful. Today, it is very unusual to use GHC by itself. To use Haskell, you install the Haskell Platform. That is GHC together with Cabal and a basic set of libraries. It is very easy to install. http://hackage.haskell.org/platform/ Almost all Haskell software is expected to be installed using Cabal nowadays. The random package is included with the Haskell Platform, so that problem should be solved too. If you need anything else that is not included in the Haskell Platform, you will most likely want to install it using the command: cabal install <package-name> Once you get DoCon working on a recent Haskell Platform, it would be wonderful if you could make it available on Hackage so that it, too, could be easily installed this way. Since the Haskell Platform is now a separate project from GHC and provides GHC only as one of its many components, you will probably get a better response to your questions on the Haskell Cafe mailing list rather than here. Thanks, Yitz

On Sat, Dec 31, 2011 at 11:43:26PM +0200, Yitzchak Gale wrote:
Serge D. Mechveliani wrote:
I have ghc-7.4.0.20111219 made from source and tested it on the DoCon-2.12 application -- thanks to people for their help! It looks all right. This was -- with skipping the module Random Now it remains to add the Random package. I have taken AC-Random Version 0.1 from hackage... Its installation requires Cabal.. And Cabal is difficult to install..
[...]
Today, it is very unusual to use GHC by itself. To use Haskell, you install the Haskell Platform. That is GHC together with Cabal and a basic set of libraries. It is very easy to install.
However, since you are willing and able to test bleeding-edge versions of GHC, you need to be able to live without the platform, which typically catches up to GHC versions only within a couple of months.
Almost all Haskell software is expected to be installed using Cabal nowadays.
It is important to know that people associate two packages with the name ``Cabal'': * cabal : package infrastructure shipped with GHC --- only a library. * cabal-install : package manager requiring a number of other packages (in particular networking packages), and providing the executable ``cabal'' Life without cabal-install is not only possible, but also safer. (See also: http://www.vex.net/~trebla/haskell/sicp.xhtml ) If you installed an experimental GHC version, it makes sense to install packages into the same directory, say /usr/local/packages/ghc-7.4.0.20111219. Assuming you downloaded AC-Random-0.1.tar.gz, do the following: tar xzf AC-Random-0.1.tar.gz cd AC-Random-0.1.tar.gz ghc --make Setup ./Setup configure --prefix=/usr/local/packages/ghc-7.4.0.20111219 -p ./Setup build -v ./Setup haddock ./Setup install -v Hope this helps! Wolfram

I wrote:
Today, it is very unusual to use GHC by itself. To use Haskell, you install the Haskell Platform. That is GHC together with Cabal and a basic set of libraries. It is very easy to install.
Wolfram Kahl wrote:
However, since you are willing and able to test bleeding-edge versions of GHC, you need to be able to live without the platform, which typically catches up to GHC versions only within a couple of months.
It's true that the platform provides a stable version of GHC, as needed by most people, not the bleeding edge. But even if you need GHC HEAD you would typically use cabal. Unless for some reason you need to shuffle around manually the various pieces that get built, follow trees of package dependencies manually, etc. There are some people who need to do it, and it is doable, though much more complicated and error-prone than just using cabal.
Almost all Haskell software is expected to be installed using Cabal nowadays.
It is important to know that people associate two packages with the name ``Cabal''
They are closely interconnected though. If you use the platform, that distinction is not very important. It just works.
Life without cabal-install is not only possible, but also safer.
I disagree with that. Manual processes are error-prone. With experience, you can learn how to do things totally manually, just like you can learn to build C projects manually without make, and with even more experience, you can learn to avoid all of the pitfalls. It's a good thing to know, but I wouldn't put it at first priority unless there's a special reason for it.
(See also: http://www.vex.net/~trebla/haskell/sicp.xhtml )
The Cabal system is quite mature now, but still far from perfect. Problems can arise. Most of the problems are inherent to the "DLL Hell" that can occur in any separate compilation system, and some arise from the fact that Cabal's dependency solver needs improvement (that's a hard problem). That link is a detailed write-up of just about everything that can possibly go wrong. In my experience, none of that happens until you've been using an installation for a long time, or if you are very trigger-happy with upgrading packages to the latest version for no reason. Or if you're using a package with a huge amount of fast-changing dependencies, like one of the web frameworks. Even then, it's almost always easy enough just to re-install the platform to get a fresh install. Your next few compiles will take a few minutes longer as some packages get rebuilt, but that's about it. To avoid that altogether, I use cabal-dev. This allows me to build a package I am working on in a sandbox with just the dependencies it needs, tailored exactly for the needs of my specific package. Cabal-dev also makes it easy to experiment with how users will experience building my package. It's good to know all the intricacies of the build system, and what is happening beneath the surface if it gets lost. The linked article is a worthwhile read for that. Regards, Yitz

I haven't entirely followed this and I see that it's been split over
multiple threads.
Did "cabal install random" actually fail for you under
ghc-7.4.0.20111219? If so I'd love to know about it as the maintainer
of the "random" package. (It seems to work for me for
random-1.0.1.1.)
That said, I'm sure AC-random is a fine alternative, and there are
many other packages on Hackage as well, including cryptographic
strength ones (crypto-api, intel-aes, etc).
Cheers,
-Ryan
On Sun, Jan 1, 2012 at 7:11 AM, Yitzchak Gale
I wrote:
Today, it is very unusual to use GHC by itself. To use Haskell, you install the Haskell Platform. That is GHC together with Cabal and a basic set of libraries. It is very easy to install.
Wolfram Kahl wrote:
However, since you are willing and able to test bleeding-edge versions of GHC, you need to be able to live without the platform, which typically catches up to GHC versions only within a couple of months.
It's true that the platform provides a stable version of GHC, as needed by most people, not the bleeding edge. But even if you need GHC HEAD you would typically use cabal. Unless for some reason you need to shuffle around manually the various pieces that get built, follow trees of package dependencies manually, etc. There are some people who need to do it, and it is doable, though much more complicated and error-prone than just using cabal.
Almost all Haskell software is expected to be installed using Cabal nowadays.
It is important to know that people associate two packages with the name ``Cabal''
They are closely interconnected though. If you use the platform, that distinction is not very important. It just works.
Life without cabal-install is not only possible, but also safer.
I disagree with that. Manual processes are error-prone.
With experience, you can learn how to do things totally manually, just like you can learn to build C projects manually without make, and with even more experience, you can learn to avoid all of the pitfalls. It's a good thing to know, but I wouldn't put it at first priority unless there's a special reason for it.
(See also: http://www.vex.net/~trebla/haskell/sicp.xhtml )
The Cabal system is quite mature now, but still far from perfect. Problems can arise. Most of the problems are inherent to the "DLL Hell" that can occur in any separate compilation system, and some arise from the fact that Cabal's dependency solver needs improvement (that's a hard problem).
That link is a detailed write-up of just about everything that can possibly go wrong. In my experience, none of that happens until you've been using an installation for a long time, or if you are very trigger-happy with upgrading packages to the latest version for no reason. Or if you're using a package with a huge amount of fast-changing dependencies, like one of the web frameworks.
Even then, it's almost always easy enough just to re-install the platform to get a fresh install. Your next few compiles will take a few minutes longer as some packages get rebuilt, but that's about it.
To avoid that altogether, I use cabal-dev. This allows me to build a package I am working on in a sandbox with just the dependencies it needs, tailored exactly for the needs of my specific package. Cabal-dev also makes it easy to experiment with how users will experience building my package.
It's good to know all the intricacies of the build system, and what is happening beneath the surface if it gets lost. The linked article is a worthwhile read for that.
Regards, Yitz
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On Sun, Jan 01, 2012 at 07:51:39AM -0500, Ryan Newton wrote:
I haven't entirely followed this and I see that it's been split over multiple threads.
Did "cabal install random" actually fail for you under ghc-7.4.0.20111219? If so I'd love to know about it as the maintainer of the "random" package. (It seems to work for me for random-1.0.1.1.)
"cabal install random" cannot run in my situation, because I have not cabal usable in the command line (I only have the Cabal library in the place where the ghc-7.4.0.20111219 libraries are installed). My idea is that having installed GHC, I use the GHC packages and, probably, do not need to install Cabal (why complicate things?, why force a DoCon user to install extra software?).
That said, I'm sure AC-random is a fine alternative, and there are many other packages on Hackage as well, including cryptographic strength ones (crypto-api, intel-aes, etc).
I tried AC-Random, and see that it suggests just different classes, with different operations. So that all the Random instances in my application must be re-programmed. So is the consequence of being out of Standard, and out of GHC ! ------ Sergei mechvel@botik.ru

On Mon, Jan 02, 2012 at 04:35:25PM +0400, Serge D. Mechveliani wrote:
On Sun, Jan 01, 2012 at 07:51:39AM -0500, Ryan Newton wrote:
I haven't entirely followed this and I see that it's been split over multiple threads.
Did "cabal install random" actually fail for you under ghc-7.4.0.20111219? If so I'd love to know about it as the maintainer of the "random" package. (It seems to work for me for random-1.0.1.1.)
"cabal install random" cannot run in my situation, because I have not cabal usable in the command line (I only have the Cabal library in the place where the ghc-7.4.0.20111219 libraries are installed). My idea is that having installed GHC, I use the GHC packages and, probably, do not need to install Cabal (why complicate things?, why force a DoCon user to install extra software?).
It is not really "forcing them to install extra software". Pretty much everyone these days will already have the Haskell Platform, which comes with cabal-install anyway. -Brent

Just FYI it is possible to use OLD "cabal" binaries with the new GHC 7.4.
No need to necessarily rebuild cabal-install with GHC 7.4.
I do this all the time. Perhaps it's a bad practice ;-).
-Ryan
On Mon, Jan 2, 2012 at 8:07 AM, Brent Yorgey
On Sun, Jan 01, 2012 at 07:51:39AM -0500, Ryan Newton wrote:
I haven't entirely followed this and I see that it's been split over multiple threads.
Did "cabal install random" actually fail for you under ghc-7.4.0.20111219? If so I'd love to know about it as the maintainer of the "random" package. (It seems to work for me for random-1.0.1.1.)
"cabal install random" cannot run in my situation, because I have not cabal usable in the command line (I only have the Cabal library in the place where the ghc-7.4.0.20111219 libraries are installed). My idea is that having installed GHC, I use the GHC packages and,
On Mon, Jan 02, 2012 at 04:35:25PM +0400, Serge D. Mechveliani wrote: probably,
do not need to install Cabal (why complicate things?, why force a DoCon user to install extra software?).
It is not really "forcing them to install extra software". Pretty much everyone these days will already have the Haskell Platform, which comes with cabal-install anyway.
-Brent
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

On Sat, Dec 31, 2011 at 15:46, Serge D. Mechveliani
Its installation requires Cabal:
which cabal cabal: Command not found.
And Cabal is difficult to install, it reports that such and such package versions are missing. On the other hand, Cabal is, probably, present inside ghc-7.4.0.20111219, somewhere in the installation directory. Thus I see its .a and .o files in ~/ghc/7.4.1pre/inst0/lib/ghc-7.4.0.20111219/Cabal-1.14.0/
This is confusing. Cabal itself is a library, which is included with ghc; the "cabal" command is not, however, part of that library. It comes from the cabal-install package. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
participants (6)
-
Brandon Allbery
-
Brent Yorgey
-
Ryan Newton
-
Serge D. Mechveliani
-
Wolfram Kahl
-
Yitzchak Gale