[darcs-users] cabal haddock --executables broken?

Trent W. Buck trentbuck at gmail.com
Fri Nov 21 07:48:14 UTC 2008


Is this supposed to work?

    $ cabal haddock --executables
    Preprocessing executables for darcs-2.1.2.2...
    Running Haddock for darcs-2.1.2.2...
    Warning: The documentation for the following packages are not
    installed. No
    links will be generated to these packages: array-0.1.0.0, base-3.0.2.0,
    bytestring-0.9.0.1.1, containers-0.1.0.2, directory-1.0.0.1,
    filepath-1.1.0.0,
    html-1.0.1.2, mtl-1.1.0.2, old-locale-1.0.0.0, old-time-1.0.0.0,
    parsec-2.1.0.1, process-1.0.0.1, random-1.0.0.0, regex-base-0.93.1,
    regex-compat-0.92, regex-posix-0.93.2, rts-1.0, terminfo-0.2.2.1,
    unix-2.3.0.1
    Preprocessing executables for darcs-2.1.2.2...

    dist/build/tmp/src/Darcs/Repository/Prefs.hs:126:0:
         error: unterminated comment

If we look at the offending line:

    $ nl -ba src/Darcs/Repository/Prefs.lhs | grep -2 ^\ *126
    124  the boring regular expressions is considered boring.  The boring file is
    125  used to filter the files provided to darcs add, to allow you to use a
    126  simple \verb-darcs add newdir newdir/*-
    127  without accidentally adding a bunch of
    128  object files.  It is also used when the \verb!--look-for-adds! flag is

We can see the problem is probably that Haddock is confused by the
single asterisk.  But this begs the point: why does haddock even care
about the literate documentation?  It's not haddock comments!

If I remove the line, I then get a different problem:

    $ cabal haddock --executables
    Preprocessing executables for darcs-2.1.0...
    Running Haddock for darcs-2.1.0...
    Warning: The documentation for the following packages are not installed. No
    links will be generated to these packages: array-0.1.0.0, base-3.0.2.0,
    bytestring-0.9.0.1.1, containers-0.1.0.2, directory-1.0.0.1, filepath-1.1.0.0,
    html-1.0.1.2, mtl-1.1.0.2, old-locale-1.0.0.0, old-time-1.0.0.0,
    parsec-2.1.0.1, process-1.0.0.1, random-1.0.0.0, regex-base-0.93.1,
    regex-compat-0.92, regex-posix-0.93.2, rts-1.0, terminfo-0.2.2.1, unix-2.3.0.1
    Preprocessing executables for darcs-2.1.0...

    src/Darcs/Patch/QuickCheck.hs:24:7:
        Could not find module `Test.QuickCheck.Test':
          it is a member of package QuickCheck-2.1.0.1, which is hidden
    haddock: Failed to load all needed modules

I guess this is because QuickCheck 2.1 is in ~/.cabal and not in
/usr/lib, but my guess of using "cabal configure --user" or "cabal
haddock --executables --user" didn't work.

I am using cabal 1.6 and cabal-install 0.6 with GHC 6.8.3 on Debian Lenny.



More information about the darcs-users mailing list