[Haskell-cafe] Re: Haddock: Documentation of instances with un-documentable type arguments

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Aug 28 07:41:43 EDT 2010


On 28 August 2010 21:33, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
>
>> > Perhaps Haddock could exclude class instance reporting when it cannot find a
>> > documentable link to a parameter?
>
> The "cannot find documentable link" problem also comes up
> in situations like this (that don't involve type classes):
>
> module Ex ( foo ) where
> data Secret = Secret
> foo = Secret
>
> Should haddock generate documentation
> for foo (since it is exported)
> or not (since its result type is not exported)?

The more important question is "why doesn't it have a type signature?" :p

How does GHC deal with that kind of situation?  Off the top of my
head, I would think that in terms of how you could use it, that would
be equivalent to also exporting Secret (the type, not the
constructor); i.e. "module Ex (Secret, foo) where ...".

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list