
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. -- Thanks a lot, Luis Cabellos

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

Ok, With your example I realized that I don't write the type signature
declaration of anything. Without the type Haddock don't put the
comments from code in the generated doc. Now it works.
Thanks. Luis
On 11/26/06, Donald Bruce Stewart
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
participants (2)
-
dons@cse.unsw.edu.au
-
Luis Cabellos