Haddock generation fails

Help
2013-03-23
2013-03-26
  • Ernesto Posse
    Ernesto Posse
    2013-03-23

    Hi. I'm unable to generate Haddock documentation. According to the user guide, you have to chose File > Export then select "Haddock documentation". There is no such option, but there is "Haskell > Cabal documentation export" which I assume is the same.

    The user guide states that "You have to specify the Haddock executable, the output directory, and you must select the source files that you want to include in the documentation." But only the output directory can be chosen.

    I chose the options to generate documentation for both executable and libraries.

    When I ran it first it gave me the following message on the console view:

    cabal: Run the 'configure' command first.
    

    And nothing was generated.

    Then, on the command-line I tried to do "cabal configure" directly on the project's root folder, and tried again.

    This time, it got further, but the message is now

    Running Haddock for HaddockTest-0.1...
    Running hscolour for HaddockTest-0.1...
    Preprocessing library HaddockTest-0.1...
    Preprocessing executable 'HaddockTest' for HaddockTest-0.1...
    Warning: The documentation for the following packages are not installed. No
    links will be generated to these packages: base-4.5.1.0, rts-1.0,
    ghc-prim-0.2.0.0, integer-gmp-0.4.0.0
    Preprocessing library HaddockTest-0.1...
    haddock: No input file(s).
    

    I thought that maybe if I selected the source files on the Project Explorer that might have helped, but I obtained the same result.

    What am I doing wrong?

    Thanks

    I'm running:

    EclipseFP 2.5.2
    haskell-platform 2012.2
    GHC 7.4.2
    cabal 1.14.0
    haddock 2.11.0
    Eclipse Juno 4.2.2
    Ubuntu 12.10

     
  • Ernesto Posse
    Ernesto Posse
    2013-03-25

    I figured it out. I hadn't marked the modules as exposed. Nevertheless I'm still confused as to why the flags to generate docs for the executable and internal modules were ignored.

     
  • JP Moresmau
    JP Moresmau
    2013-03-26

    That's weird, you're right, since your output does say that the executable is processed. About cabal configure, there should be no need to run it if your project was built in Eclipse, since of course we run cabal configure ourselves.