There is a regression in the GHC HEAD (or whatever we call this after the
switch to darcs) when trying to build Haddock:

   ...
   [EMAIL PROTECTED]:~/haddock> runhaskell Setup.lhs build
   Preprocessing executables for Haddock-0.8...
   shift/reduce conflicts:  5
   Building Haddock-0.8...
   Chasing modules from: src/Main.hs
   [ 1 of 26] Compiling Digraph          ( src/Digraph.lhs, 
dist/build/haddock/haddock-tmp/Digraph.o )
   [ 2 of 26] Compiling BlockTable       ( src/BlockTable.hs, 
dist/build/haddock/haddock-tmp/BlockTable.o )
   [ 3 of 26] Compiling Html             ( src/Html.hs, 
dist/build/haddock/haddock-tmp/Html.o )

   src/Html.hs:87:6: Parse error in pattern

After some investigation it turns out that this is caused by -fglasgow-exts,
but I don't have a clue what exactly goes wrong. After removing
"PatternGuards" from the .cabal file so that no -fglasgow-exts is passed to
GHC, the next problem occurs:

   [EMAIL PROTECTED]:~/haddock> runhaskell Setup.lhs build
   Preprocessing executables for Haddock-0.8...
   Building Haddock-0.8...
   Chasing modules from: src/Main.hs
   [ 1 of 26] Compiling Digraph          ( src/Digraph.lhs, 
dist/build/haddock/haddock-tmp/Digraph.o )
   [ 2 of 26] Compiling BlockTable       ( src/BlockTable.hs, 
dist/build/haddock/haddock-tmp/BlockTable.o )
   [ 3 of 26] Compiling Html             ( src/Html.hs, 
dist/build/haddock/haddock-tmp/Html.o )
   [ 4 of 26] Compiling FastMutInt       ( src/FastMutInt.hs, 
dist/build/haddock/haddock-tmp/FastMutInt.o )
   [ 5 of 26] Compiling Binary           ( src/Binary.hs, 
dist/build/haddock/haddock-tmp/Binary.o )
   [ 6 of 26] Compiling HsSyn            ( src/HsSyn.lhs, 
dist/build/haddock/haddock-tmp/HsSyn.o )
   [ 7 of 26] Compiling HsParseMonad     ( src/HsParseMonad.lhs, 
dist/build/haddock/haddock-tmp/HsParseMonad.o )
   [ 8 of 26] Compiling HsParseUtils     ( src/HsParseUtils.lhs, 
dist/build/haddock/haddock-tmp/HsParseUtils.o )
   [ 9 of 26] Compiling HsLexer          ( src/HsLexer.lhs, 
dist/build/haddock/haddock-tmp/HsLexer.o )
   [10 of 26] Compiling HaddockLex       ( src/HaddockLex.hs, 
dist/build/haddock/haddock-tmp/HaddockLex.o )
   [11 of 26] Compiling HaddockParse     ( src/HaddockParse.hs, 
dist/build/haddock/haddock-tmp/HaddockParse.o )

   src/HaddockParse.hs:376:19: Not in scope: `tk'

GHC is quite right here, the offending lines are:

   happyNewToken action sts stk [] =
           happyDoAction 14# tk action sts stk []

This happens with a brand new Happy and one which is a few months old. Do the
nightly builds include Alex/Happy/Haddock? Can somebody fix Happy?

Cheers,
   S.

P.S.: Haddock can easily be changed to remove the pattern guards, which would
be a good thing IMHO. This feature seems to be a bit overused by its
inventor... ;-)

Reply via email to