[Haddock] Documentation for data family instances

C Rodrigues red5_2 at hotmail.com
Fri Oct 1 22:41:51 EDT 2010



I just sent a patch to show data instances in HTML.

I had to work around the existing infrastructure's assumption that every declaration consists of a top-level name (with 
documentation) and subordinate names (with documentation).  Data families don't follow that rule: they consist of a top-level name 
(the family declaration) with anonymous subordinates (the instances) with subordinate names (data constructors).  I changed 
'DeclInfo' to allow both structures, which required touching a lot of code mostly in 'Create.hs'.  This seemed like the natural 
thing to do, but I'm not positive it's the right design.

There's a problem with the current design.  If Haddock can't find the documentation for a data family declaration, it won't show 
documentation for instances or constructors.

There's also a bug where a data family declaration shows up in multiple modules.  This appears to be a preexisting bug. 		 	   		  


More information about the Haddock mailing list