[Haskell-beginners] Haskell, Ray Tracing, Parallel Computation

Jon Harrop jon at ffconsultancy.com
Fri Jan 15 12:24:11 EST 2010


On Friday 15 January 2010 15:17:38 Tom Davie wrote:
> You should be able to get it just by running cabal update & cabal install
> AC-Vector.

When I run "cabal install" it says:

$ cabal update
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install

If I run "cabal install cabal-install" as it suggests then it appears to do a 
lot of work, ending with this:

...
[33 of 34] Compiling Distribution.Client.List ( Distribution/Client/List.hs, 
dist/build/cabal/cabal-tmp/Distribution/Client/List.o )
[34 of 34] Compiling Main             ( Main.hs, 
dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
Installing executable(s) in /home/jdh30/.cabal/bin

But when I run "cabal install" again it fails to detect the updated 
cabal-install correctly:

$ cabal update
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install

> With 6.12 it may be that you don't have the cabal-install package installed
> already, so cabal install won't work.
>
> If that's the case, you'll need to download cabal-install and it's deps and
> install it using runhaskell Setup.hs configure, runhaskell Setup.hs build
> ad runhaskell Setup.hs install.

Those "runhaskell" commands don't do anything here. If I use bootstrap.sh then 
I get:

$ ./bootstrap.sh

Error during cabal-install bootstrap:
Version mismatch between ghc and ghc-pkg If you set the GHC variable then set 
GHC_PKG too

So I do:

$ export GHC=ghc-6.12.1
$ export GHC_PKG=ghc-pkg-6.12.1

Then "bootstrap.sh" gets a bit further:

$ ./bootstrap.sh
Checking installed packages for ghc-6.12.1...

The Haskell package 'parsec' is required but it is not installed.
If you are using a ghc package provided by your operating system
then install the corresponding packages for 'parsec' and 'network'.
If you built ghc from source with only the core libraries then you
should install these extra packages. You can get them from hackage.

Error during cabal-install bootstrap:
The Haskell package 'parsec' is required but it is not installed.

I cannot install the appropriate libghc6-parsec-dev package from any Debian 
because they all require GHC =6.8.

> That, or wait until 6.12 is considered stable enough to become part of the
> Haskell platform.

How long will that take?

> For reference – I can quite believe that Haskell came out incredibly fast
> here – it's trivially easy to parallelise haskell programs, and GHC deals
> with parallelisation well (except for garbage collection unfortunately).

Yeah, I don't believe his Haskell is correct let alone fast. :-)

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


More information about the Beginners mailing list