[Haddock] Documentation for data family instances

David Waern david.waern at gmail.com
Sun Oct 17 06:33:30 EDT 2010

Hi Rodrigues,

> 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.

Another approach that fits better into the current design would be to
use the expItemInstances field to store the instances. That would
require coming up with some data type to unify type family instances
with normal instances. What do you think?


More information about the Haddock mailing list