[Haskell-cafe] Compilers

Daniel Fischer daniel.is.fischer at web.de
Sat Nov 29 20:59:25 EST 2008

Am Sonntag, 30. November 2008 00:17 schrieb Austin Seipp:
> If you would be so kind as to try the latest lhc instead by running:
> $ cabal install lhc-0.6.20081127
> And reporting back, I would like to hear the results and if it went
> well. :)

Got and installed a lot of dependencies and the latest and greatest lhc in 20 
minutes (may have been 21, I didn't time it with a stop-watch) again :)

> > Unfortunately:
> > $ lhc -o lhcHeap heapMain
> > lhc: user error (LibraryMap: Library base not found!)
> >
> > Oops.
> There is a reason this is happening, and there isn't an easy way to
> get around it right now, it seems.
> The problem is that when you just install lhc, it has no libraries. To
> install the base library, you are going to need a copy of the lhc
> source code - this cannot be automated by hackage.
> Why? Because we are afraid that by uploading lhc's version of base -
> simply called 'base' - to hackage, will will inadvertantly stop every
> continually uploaded package from building, and cabal install could
> stop working too. Scary thought, huh? :)

Fair enough. Might be good to advertise that on Hackage, though.

> The easiest way to fix this problem is by doing the following:
> 1. You probably want the darcs version of LHC anyway if you're willing
>    to try it. Good improvements are being made pretty much every day.
> 2. After you get the darcs repository, just go into it and do 'cabal
>    install'

dafis at linux:~/lhc> darcs get --partial http://code.haskell.org/lhc
Invalid repository:  http://code.haskell.org/lhc

darcs failed:  failed to fetch: http://code.haskell.org/lhc/_darcs/inventory 
ExitFailure 1

There's a hashed_inventory in lhc/_darcs, but no inventory.
Is that a darcs2 vs. darcs1 incompatibility and I'm just screwed or is the 
repo broken?

> 3. To install base, you are probably going to want the latest versions
>    of both cabal and cabal-install from the darcs repository - they
>    include support for LHC already (cabal 1.7.x.)

Okay, done. Though for some reason cabal --version says 
cabal-install version 0.6.0
using version of the Cabal library

even though I changed the constraint to Cabal >= 1.7 in the 
cabal-install.cabal file?

> 4. After you've installed lhc and the latest cabal/cabal install, you
>    can just do:
>    $ cd lhc/lib/base
>    $ cabal install --lhc
>    And it should Just Work.

Will try if I can darcs get the repo :-/

> All of these instructions can be found here:
> http://lhc.seize.it/#development
> Don Stewart just brought up this point in #haskell, so I think I will
> modify the wiki page a bit (http://lhc.seize.it) and highlight these
> notes and why it's currently like this.
> I apologize for it being so cumbersome right now. We're trying to
> figure out a good solution.
> > Okay, ./configure --help and searching through the configure script
> > (which I completely don't know the syntax of) lead me to try
> > ./configure --prefix=$HOME DRIFTGHC=/home/dafis/.cabal/bin/DrIFT
> > which successsfully completes the configure step, but shouldn't configure
> > find executables in the path?
> The reason is because the configure.ac script is designed to search
> for an executable named 'drift-ghc', not 'DrIFT'. I have no idea why.
> > import System (getArgs). Now
> > ... myriads of lines of output ...
> > jhc: user error (Grin.FromE - Unknown primitive: ("eqRef__",[EVar
> > (6666::ELit (Data.IORef.Ref__ (ELit (Jhc at .Box.*::ESort *))::ESort
> > #)),EVar (6670::ELit (Data.IORef.Ref__ (ELit (Jhc at .Box.*::ESort
> > *))::ESort #))]))
> >
> > What?
> > And I get the same error for every nontrivial programme I tried to
> > compile, but not for a couple of trivial programmes.
> LHC and JHC are still extremely incomplete. They're nowhere near as
> supportive of extensions or libraries as GHC is. Don't count on them
> compiling anything non-trivial just yet.

No extensions and libraries, just a bit of Haskell98, the implicit heap from 
http://www.haskell.org/haskellwiki/Primes with a main that prints the n-th 
prime. I wouldn't expect many extensions yet, but most of H98.

> Austin


More information about the Haskell-Cafe mailing list