On Mon, Aug 4, 2008 at 12:07 PM, Claus Reinke <[EMAIL PROTECTED]> wrote:
> make distclean; ./darcs-all pull -a; sh boot; ./configure ..; make
>
> first complained about
>
>   parser/Parser.hs:14:36:
>
>       Module `HscTypes' does not export `DeprecTxt'
>
> Since Parser.hs and Parser.y looked different, I removed the former
> and tried again. But now, I get
>
> dist-stage1/build/Parser.hs:7171:5:
>
>   Not in scope: data constructor `ITwarning_prag'
>
> and that constructor really does occur in Parser.y.pp. I've got
> no idea why the location of the file in the message has changed,
> which suggests that something else is wrong.
>
> Since I always do distclean before pull, this kind of confusion
> surprises me, but it does look like leftovers somewhere, especially
> since buildbot just went past that stage1.
> Do I really have to download the whole ghc-repo tarball again and start from
> scratch (since there have been capitalization issues in the repos since I
> last did that, I doubt that I can use darcs to copy the old repo?)?
>

It seems that the old, pre-Cabal build system did not clean some or
all of the preprocessed files (such as Parser.hs).  This was not much
of a problem in practice, because the Makefiles used the relative
timestamps to tell whether to regenerate Parser.hs from Parser.y.  In
contrast, Cabal stores all generated files in a separate directory
(compiler/dist-stage[1/2]), and thus doesn't need to look at relative
timestamps; so it gets confused by the old, leftover Parser.hs et al.

Ironically this is another reason that switching to Cabal is a win --
cleaning of preprocessed files happens automatically.  Unfortunately,
though, it looks like all of those leftover preprocessed files will
need to be deleted manually (but only this one time).  The following
command worked for me (run inside the 'compilers' directory);

find . -name "*.x" -or -name "*.y" -or -name "*.hsc" | sed
's/\(.*\)\..*/\1.hs/' | xargs rm

Or you can just delete these files by hand:

compiler/cmm/CmmLex.hs
compiler/cmm/CmmParse.hs
compiler/ghci/LibFFI.hs
compiler/main/ParsePkgConf.hs
compiler/parser/HaddockLex.hs
compiler/parser/HaddockParse.hs
compiler/parser/Lexer.hs
compiler/parser/ParserCore.hs
compiler/utils/Fingerprint.hs

Hope that helps,
-Judah

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to