question about "How to Write a Haskell Program" tutorial

First off, I apologize if this has come up before. As far as I can tell, the mailing list archives don't have a search function. I'm running ghc-6.6 and haddock-0.8, both compiled from source. I'm working my way through the "How to Write a Haskell Program" tutorial (which is a great idea, thanks guys!), and everything works fine until I get to the part about creating the haddock documentation. When I run: $ runhaskell Setup.hs haddock I get this: Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... Warning: cannot use package haq-0.0: ghc-pkg failed With verbosity: $ runhaskell Setup.hs haddock -v I get this: Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... /usr/local/packages/haskell-misc/bin/haddock --html --odir=dist/doc/html/haq --title=haq --use-package=haq-0.0 --use-package=base-2.0 dist/build/tmp/Haq.hs Warning: cannot use package haq-0.0: ghc-pkg failed Note that I'm installing into a non-standard location. I have no idea why haddock (called from cabal) is trying to use a package that is in the process of being created. Nevertheless, the documentation does get generated. Is this just something that should be ignored? Is it a Cabal bug? Mike

mvanier:
First off, I apologize if this has come up before. As far as I can tell, the mailing list archives don't have a search function. I'm running ghc-6.6 and haddock-0.8, both compiled from source.
I'm working my way through the "How to Write a Haskell Program" tutorial (which is a great idea, thanks guys!), and everything works fine until I get to the part about creating the haddock documentation. When I run:
$ runhaskell Setup.hs haddock
I get this:
Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... Warning: cannot use package haq-0.0: ghc-pkg failed
With verbosity:
$ runhaskell Setup.hs haddock -v
I get this:
Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... /usr/local/packages/haskell-misc/bin/haddock --html --odir=dist/doc/html/haq --title=haq --use-package=haq-0.0 --use-package=base-2.0 dist/build/tmp/Haq.hs Warning: cannot use package haq-0.0: ghc-pkg failed
Ah yes, I get this too when using ghc 6.6. With ghc 6.4.2 the haddock goes through fine. Updating haddock to 0.8 and the ghc-pkg error is still there. But the docs seem to be generated ok: Main Synopsis main :: IO () Documentation main :: IO () main runs the main program Produced by Haddock version 0.8 Simon, know what's going on? -- Don

Donald Bruce Stewart wrote:
mvanier:
First off, I apologize if this has come up before. As far as I can tell, the mailing list archives don't have a search function. I'm running ghc-6.6 and haddock-0.8, both compiled from source.
I'm working my way through the "How to Write a Haskell Program" tutorial (which is a great idea, thanks guys!), and everything works fine until I get to the part about creating the haddock documentation. When I run:
$ runhaskell Setup.hs haddock
I get this:
Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... Warning: cannot use package haq-0.0: ghc-pkg failed
With verbosity:
$ runhaskell Setup.hs haddock -v
I get this:
Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... /usr/local/packages/haskell-misc/bin/haddock --html --odir=dist/doc/html/haq --title=haq --use-package=haq-0.0 --use-package=base-2.0 dist/build/tmp/Haq.hs Warning: cannot use package haq-0.0: ghc-pkg failed
Ah yes, I get this too when using ghc 6.6. With ghc 6.4.2 the haddock goes through fine.
Updating haddock to 0.8 and the ghc-pkg error is still there. But the docs seem to be generated ok: Main Synopsis main :: IO () Documentation main :: IO () main runs the main program Produced by Haddock version 0.8
Simon, know what's going on?
Fixed. The error is non-fatal (as you noticed) and was introduced in a recent version of Cabal. Cheers, Simon
participants (3)
-
dons@cse.unsw.edu.au
-
Michael Vanier
-
Simon Marlow