Building cabal with cabal fails?

shelarcy shelarcy at gmail.com
Thu Aug 17 09:37:58 EDT 2006


On Thu, 17 Aug 2006 21:48:13 +0900, Neil Mitchell <ndmitchell at gmail.com>  
wrote:
> 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/


More information about the cabal-devel mailing list