
Hi, Using GHC 6.4.2, in prepration for some cabal hacking, I decided to download Cabal from darcs and install it. darcs get http://darcs.haskell.org/packages/Cabal --partial cd Cabal runhaskell Setup configure And I get the error: ./Distribution/Simple.hs:61:1: lexical error Should this work? If not, what should I be doing. Thanks Neil

On 8/17/06, Neil Mitchell
Using GHC 6.4.2, in prepration for some cabal hacking, I decided to download Cabal from darcs and install it.
darcs get http://darcs.haskell.org/packages/Cabal --partial cd Cabal runhaskell Setup configure
And I get the error:
./Distribution/Simple.hs:61:1: lexical error
Should this work? If not, what should I be doing.
Arguably, it should. Unfortunately it doesn't. I think this is what I do with ghc (in Windows): ghc -hide-all-packages -package base -package Cabal Setup.lhs -o setup But of course that requires one cabal already installed and working. If you have ghc 6.4.2, that should be no problem. I think it used to be possible just to pass -cpp and compile setup using the Distribution- sources in tree, but that stopped working at some point. Best regards, --Esa

On 8/17/06, Neil Mitchell
Hi
ghc -hide-all-packages -package base -package Cabal Setup.lhs -o setup
Perfect :) Complete success this time. Is there any way to reduce the command line foo required, to shove any of this information into the package required?
runhaskell -i Setup.lhs configure -- Cheers, Lemmih

Esa Ilari Vuokko wrote:
On 8/17/06, Neil Mitchell
wrote: Using GHC 6.4.2, in prepration for some cabal hacking, I decided to download Cabal from darcs and install it.
darcs get http://darcs.haskell.org/packages/Cabal --partial cd Cabal runhaskell Setup configure
And I get the error:
./Distribution/Simple.hs:61:1: lexical error
Should this work? If not, what should I be doing.
Arguably, it should. Unfortunately it doesn't. I think this is what I do with ghc (in Windows):
ghc -hide-all-packages -package base -package Cabal Setup.lhs -o setup
But of course that requires one cabal already installed and working. If you have ghc 6.4.2, that should be no problem. I think it used to be possible just to pass -cpp and compile setup using the Distribution- sources in tree, but that stopped working at some point.
ghc --make -cpp Setup.lhs works for me. Also adding -i will cause it to use whatever Cabal you have installed instead of the sources in the tree. When you say it stopped working at some point, what are you referring to? Cheers, Simon

On 8/22/06, Simon Marlow
ghc --make -cpp Setup.lhs
works for me. Also adding -i will cause it to use whatever Cabal you have installed instead of the sources in the tree.
When you say it stopped working at some point, what are you referring to?
That it didn't work for me at some point in the past. It does now, however. Sorry, I was going by memory there, without testing code in darcs repo. Best regards, --Esa

There was some issue with having a sufficiently up to date version of Alex. No idea whether that's your problem, but I'd get the latest Alex anyway S | -----Original Message----- | From: libraries-bounces@haskell.org [mailto:libraries-bounces@haskell.org] On Behalf Of Neil Mitchell | Sent: 17 August 2006 13:48 | To: libraries@haskell.org | Subject: Building cabal with cabal fails? | | Hi, | | Using GHC 6.4.2, in prepration for some cabal hacking, I decided to | download Cabal from darcs and install it. | | darcs get http://darcs.haskell.org/packages/Cabal --partial | cd Cabal | runhaskell Setup configure | | And I get the error: | | ./Distribution/Simple.hs:61:1: lexical error | | Should this work? If not, what should I be doing. | | Thanks | | Neil | _______________________________________________ | Libraries mailing list | Libraries@haskell.org | http://www.haskell.org/mailman/listinfo/libraries

Hi
There was some issue with having a sufficiently up to date version of Alex. No idea whether that's your problem, but I'd get the latest Alex anyway
A certain irony - one of the reasons I am trying to upgrade Cabal is because Alex gave Cabal errors, which seem like they might be due to an old version of Cabal. Thanks Neil
| -----Original Message----- | From: libraries-bounces@haskell.org [mailto:libraries-bounces@haskell.org] On Behalf Of Neil Mitchell | Sent: 17 August 2006 13:48 | To: libraries@haskell.org | Subject: Building cabal with cabal fails? | | Hi, | | Using GHC 6.4.2, in prepration for some cabal hacking, I decided to | download Cabal from darcs and install it. | | darcs get http://darcs.haskell.org/packages/Cabal --partial | cd Cabal | runhaskell Setup configure | | And I get the error: | | ./Distribution/Simple.hs:61:1: lexical error | | Should this work? If not, what should I be doing. | | Thanks | | Neil | _______________________________________________ | Libraries mailing list | Libraries@haskell.org | http://www.haskell.org/mailman/listinfo/libraries

I'm sorry for that I posted wrong mailiing-list
and I have to send this mail again.
On Thu, 17 Aug 2006 21:48:13 +0900, Neil Mitchell
darcs get http://darcs.haskell.org/packages/Cabal --partial cd Cabal runhaskell Setup configure
And I get the error:
./Distribution/Simple.hs:61:1: lexical error
Should this work? If not, what should I be doing.
If Distribution directory is in the same directory, runhaskell find and use that. So, Setup.(l)hs import Distribution directory's source file, not ghc's Distribution/*. And ./Distribution/Simple.hs uses C preprocessor, so that cause lexical error. If you want to solve this error, you should use cpp option like this. runhaskell -cpp Setup.lhs configure runhaskell -cpp Setup.lhs build runhaskell -cpp Setup.lhs install Or you have to change to add below pragma per file that you can see lexical error. {-# OPTIONS -cpp #-} -- shelarcy <shelarcy capella.freemail.ne.jp> http://page.freett.com/shelarcy/
participants (6)
-
Esa Ilari Vuokko
-
Lemmih
-
Neil Mitchell
-
shelarcy
-
Simon Marlow
-
Simon Peyton-Jones