
Hello all, I've got a problem with a package I maintain. I have a Cabal package which contains one module which uses GADTs. This module is hidden. Now, Haddock barfs if you try to generate Haddock docs from a module containing GADTs. With Cabal 1.1.3, hidden modules (apparently...) are not parsed by Haddock at all, so it has no opportunity to barf on my GADTs, and I could get useable docs out. However, with 1.1.4, Cabal now tells Haddock to parse this file, but also gives it the -- hide option. Haddock subsequently refuses to generate any documentation. I can remove the hidden modules from the "other modules" section, but then the object code doesn't end up in the libraries and programs won't build. Aggh! Is there any way to fix this problem? Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG

On 5/29/06, Robert Dockins
Hello all,
I've got a problem with a package I maintain. I have a Cabal package which contains one module which uses GADTs. This module is hidden. Now, Haddock barfs if you try to generate Haddock docs from a module containing GADTs. With Cabal 1.1.3, hidden modules (apparently...) are not parsed by Haddock at all, so it has no opportunity to barf on my GADTs, and I could get useable docs out. However, with 1.1.4, Cabal now tells Haddock to parse this file, but also gives it the -- hide option. Haddock subsequently refuses to generate any documentation. I can remove the hidden modules from the "other modules" section, but then the object code doesn't end up in the libraries and programs won't build. Aggh!
Is there any way to fix this problem?
#ifndef __HADDOCK__ [GADTs here] #endif -- Friendly, Lemmih

On May 29, 2006, at 9:32 AM, Lemmih wrote:
On 5/29/06, Robert Dockins
wrote: Hello all,
I've got a problem with a package I maintain. I have a Cabal package which contains one module which uses GADTs. This module is hidden. Now, Haddock barfs if you try to generate Haddock docs from a module containing GADTs. With Cabal 1.1.3, hidden modules (apparently...) are not parsed by Haddock at all, so it has no opportunity to barf on my GADTs, and I could get useable docs out. However, with 1.1.4, Cabal now tells Haddock to parse this file, but also gives it the -- hide option. Haddock subsequently refuses to generate any documentation. I can remove the hidden modules from the "other modules" section, but then the object code doesn't end up in the libraries and programs won't build. Aggh!
Is there any way to fix this problem?
#ifndef __HADDOCK__ [GADTs here] #endif
Ahh! A simple solution! This is better than I dared hope. Many thanks. *crawls back into his cave, embarrassed by the simplicity of the solution...*
-- Friendly, Lemmih
Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG

On Mon, 2006-05-29 at 09:51 -0400, Robert Dockins wrote:
Is there any way to fix this problem?
#ifndef __HADDOCK__ [GADTs here] #endif
Ahh! A simple solution! This is better than I dared hope. Many thanks.
*crawls back into his cave, embarrassed by the simplicity of the solution...*
It is rather a pain that so many people have to use this hack. Fortunately there is hope for a better solution. David Waern is working on a project (with Simon Marolow as mentor) as part of the Google Summer of Code programme to teach GHC about the Haddock documentation markup and then make Haddock use the GHC API to get at the information. That way Haddock will be able to parse any file that GHC can. As an extra bonus this should allow apps like GHCi and IDEs to get at documentation easily. So, good luck on the project David! Duncan
participants (3)
-
Duncan Coutts
-
Lemmih
-
Robert Dockins