Ticket #183 (closed defect: fixed)

Opened 6 years ago

Last modified 3 years ago

"failed to parse haddock prologue from file" error on module

Reported by: jberryman Owned by:
Priority: minor Milestone:
Version: 2.9.2 Keywords:


I've attached the project-in-progress that gives me this error (please ignore the ugly code therein). I tried removing some of the blocks of comments to see if any of them were causing a parse error, but without luck.

» cabal configure && cabal haddock                                                    1 ↵
Resolving dependencies...
Configuring pez-0.1.0...
Running Haddock for pez-0.1.0...
Preprocessing library pez-0.1.0...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0, fclabels-1.0.4
Warning: Cannot read /home/me/.cabal/share/doc/thrist-0.2/html/thrist.haddock:
   Interface file is of wrong version: /home/me/.cabal/share/doc/thrist-0.2/html/thrist.haddock
Skipping this interface.
haddock coverage for dist/build/tmp16310/Data/Label/Zipper.hs:   28/30  93%
Warning: Data.Label.Zipper: could not find link destinations for:
    Data.Label.Abstract.Lens Data.Label.Maybe.:~>
haddock: failed to parse haddock prologue from file: dist/doc/html/pez/haddock-prolog16310.txt

I am able to build documentation for some other modules on my disk, but this one craps out on me.

» whereis haddock
haddock: /usr/bin/haddock /usr/share/man/man1/haddock.1.gz
» whereis cabal
cabal: /usr/bin/cabal
» cabal --version
cabal-install version 0.10.2
using version of the Cabal library 
» haddock --version
Haddock version 2.9.2, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008

sorry to dump my whole project on you all, but I can't seem to get any helpful debugging messages or track down the source of the error.


pez.tar.gz (104.8 kB) - added by jberryman 6 years ago.
failing project

Change History

Changed 6 years ago by jberryman

failing project

Changed 6 years ago by jberryman

  • priority changed from major to minor

I figured out what haddock was choking on: I needed a new line with a dot in the package description before a code block:

    Changes 0.0.4 -> 0.1.0:
    >  - use fclabels 1.0
    >  - zipper operations in Maybe by default

Naturally it would be nice if haddock could report a useful message in this case. Even knowing that the issue was in the .cabal file would have been a tremendous help.

Changed 5 years ago by anonymous

  • milestone 2.10.0 deleted

Milestone 2.10.0 deleted

Changed 3 years ago by Fūzetsu

  • status changed from new to closed
  • resolution set to fixed

This problem is now gone, almost certainly due to the new parser.

The reason why you're not told this comes from the cabal file is because Haddock doesn't know it. Cabal rips out the description, puts it in a separate file and then uses the -p flag to pass us the path to the file, which _is_ printed.

Note: See TracTickets for help on using tickets.