[Haddock] Haddock infers types in some situations but not others?

David Waern david.waern at gmail.com
Mon Nov 28 14:57:03 GMT 2011


2011/11/28 Richard Silverman <res at qoxp.net>:
>
> Hello,
>
> I have a question about Haddock (version 2.9.4). When I give it a module
> which exports some functions, I don't have to give type signatures for those
> functions; it uses GHC to infer the types and includes them in the doc.
> However, if I have it document everything in the module, either by giving an
> empty export list or using --ignore-all-exports, it does *not* do that. In
> fact, it only documents functions for which I've given explicit types in the
> program.
>
> Is there a way to have it include inferred types in the latter situation as
> well?

Hi Tyson,

unfortunately there's no way to do that currently. The fact that it
partly works now is actually a side-effect of the SoC project on
cross-package documentation. I don't think much more work is needed to
complete this feature, but no one is working on it at the moment. If
you feel like doing a little bit of hacking it could be a fun project!

David



More information about the Haddock mailing list