[Haskell-cafe] Re: Haddock compilation problem

Matti Niemenmaa matti.niemenmaa+news at iki.fi
Fri Jun 20 14:56:47 EDT 2008

Ronald Guida wrote:
> I just upgraded to ghc-6.8.3, using a linux binary, and I am having a
> problem compiling Haddock.  Haddock 2.1.0 and Haddock both
> fail to build under ghc-6.8.3, but they both build successfully with
> ghc-6.8.2.  I don't know if this is a Haddock problem, or a GHC
> problem, or perhaps something else entirely?
> Here is the error I'm getting.  It is the same error for either
> version of Haddock.
> [15 of 24] Compiling Haddock.GHC.Typecheck (
> src/Haddock/GHC/Typecheck.hs,
> dist/build/haddock/haddock-tmp/Haddock/GHC/Typecheck.o )
> src/Haddock/GHC/Typecheck.hs:82:4:
>     Constructor `HsModule' should have 7 arguments, but has been given 8
>     In the pattern: HsModule _ _ _ _ _ mbOpts _ _
>     In a pattern binding: HsModule _ _ _ _ _ mbOpts _ _ = unLoc parsed

I managed to fix this with a bit of hacking:
1) add "import FastString" to the top of the file
2) remove one of the _'s before mbOpts on that line that gives the error
3) on line 72 of the original file (probably 73 after step 1), insert 'fmap 
unpackFS' before 'mbOpts'.

I now get some sort of System.Process-related link error, though. YMMV.

libHSghc.a(SysTools.o)(.text+0x7200):fake: undefined reference to 
libHSghc.a(SysTools.o)(.text+0x75c5):fake: undefined reference to 
libHSghc.a(SysTools.o)(.text+0xa6df):fake: undefined reference to 
libHSghc.a(SysTools.o)(.text+0x7215):fake: undefined reference to 
libHSghc.a(SysTools.o)(.text+0x75d4):fake: undefined reference to 
libHSghc.a(SysTools.o)(.data+0xcf8):fake: undefined reference to 
libHSghc.a(SysTools.o)(.data+0xcfc):fake: undefined reference to 
libHSghc.a(SysTools.o)(.data+0xd00):fake: undefined reference to 

More information about the Haskell-Cafe mailing list