[Haskell-cafe] Problem with haddock 2.3.0 (again)

David Waern david.waern at gmail.com
Mon Dec 15 03:55:18 EST 2008

2008/12/12 Sean Leather <leather at cs.uu.nl>:
> On Fri, Dec 12, 2008 at 13:22, Thomas Schilling wrote:
>> The fromJust error is a bug, of course, however, the underlying
>> problem is a bit more difficult:
>> Haddock doesn't generate any code, it only typechecks.  If the code
>> uses Template Haskell, however, the typechecker will have to run
>> Haskell code and potentially this code will have to come from a module
>> of the same package.  If the code indeed comes from the same package,
>> fixing the fromJust error will just lead to GHCi linker error, since
>> Haddock didn't generate any code for these.
> Thanks for enlightening us, Thomas.
>> Here are a couple of solutions and non-solutions:
> [...]
>> Any other?
> What about the eventual (maybe never?) solution of collecting comments and
> types for Haddock after splicing in code? This is more long term, perhaps,
> but in the end ideal if it can be made to work.

This is what Haddock does, actually. It works when the spliced-in code
comes from another package (although this causes another problem,
currently), and we should make it work also for your case where the
code comes from the same package. With some improvements to the GHC
API (and Haddock), we should be able to fix this.


More information about the Haskell-Cafe mailing list