Cabal Release Candidate

Simon Marlow simonmar at
Fri Jul 15 04:26:25 EDT 2005

On 14 July 2005 17:47, Isaac Jones wrote:

> "Simon Marlow" <simonmar at> writes:
>> I just discovered a problem.  In GHC > 6.4, local modules take
>> precedence over package modules.  This causes a problem for the
>> Cabal distribution, eg: 
>> $ ghc-6.4.1 Setup.lhs --make -o setup
>> Chasing modules from: Setup.lhs
>> ./Distribution/Simple.hs:61:1: lexical error
>> ie. it picks up Distribution.Simple from the local copy rather than
>> the installed version.  The solution is simple, if a little
>> inconvenient: the Cabal sources have to move into a subdirectory of
>> the distribution. 
> It's supposed to do this; use "make setup" (which just passes -cpp to
> ghc) to create the setup file.  It bootstraps itself, but I could move
> the sources into a subdirectory anyway to make it possible to build it
> either way.

Yes, but the problem is that I can't do 'runghc Setup.lhs', because it
fails as above.  It works with GHC 6.4, though.  Even if we fixed the
compilation failures (perhaps with appropriate {-# OPTIONS #-} pragmas),
'runghc Setup.lhs' would still compile the whole of Cabal each time,
which is sub-optimal.  Putting the sources in a subdirectory would fix
this infelicity, and you can still bootstrap using the Makefile.


More information about the Libraries mailing list