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

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Aug 25 08:06:44 EDT 2010

On 25 August 2010 21:36, Johannes Waldmann <waldmann at imn.htwk-leipzig.de> wrote:
>> Perhaps Haddock could exclude class instance reporting [...]
> Instances are global, and cannot be hidden.
> You cannot prevent their use, so you might as well document them.

Yes you can; in that example Alexander linked to before, you can't use
the class methods of GraphvizResult; try it, they are:

outputCall :: (GraphvizResult o) => o -> String
isBinary :: (GraphvizResult o) => o -> Bool

In this case, the class is one defined inside that module and used
solely for those two data types; it isn't exported, and the only way
you can tell it exists is that Haddock mentions the instances.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list