[Haskell-cafe] Haddock question
Donald Bruce Stewart
dons at cse.unsw.edu.au
Sat Nov 25 18:35:07 EST 2006
zhen.sydow:
> Hello,
>
> I follow the How to Write a Haskell program from
> http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program, but
> I have a problem with Haddock.
>
> I use Windows XP, I when I install GHC + Haddock I have this warning output
>
> C:\code\haskell\test> runhaskell Setup.hs haddock
> Preprocessing executables for Test-0.0...
> Running Haddock for Test-0.0...
> Warning: cannot use package Test-0.0:
> ghc-pkg failed
> Warning: cannot use package base-2.0:
> does not exist.y $topdir\html\libraries\base
>
> There is something generated in dist\doc\html\test path but only the
> main function page but it don't has the comments from *.hs file.
>
> I use --prefix=c:\programs instead of --prefix=$HOME in configure.
> Because I am working on Windows.
>
> I don't use darcs, but I think that it's not the problem.
It appears to be an error in current haddock when interacting with ghc
6.6.
If you use haddock 0.8, the error message is there, but the
documentation is still generated, so should be ok:
$ runhaskell Setup.lhs haddock
Preprocessing executables for haq-0.0...
Running Haddock for haq-0.0...
Warning: cannot use package haq-0.0:
ghc-pkg failed
Warning: cannot use package base-2.0:
HTML directory /home/dons/share/ghc-6.6/html/libraries/base does not exist.
Warning: Main: the following names could not be resolved:
IO
$ w3m -dump dist/doc/html/haq/Main.html
haq Contents Index
Main
Synopsis
main :: IO ()
Documentation
main :: IO ()
main runs the main program
Produced by Haddock version 0.8
So grab haddock 0.8 and try that.
http://haskell.org/haddock/#Download
-- Don
More information about the Haskell-Cafe
mailing list