Type Families in Haddock
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Thu Jul 3 21:44:08 EDT 2008
Hi David,
> I'm going to add Type Families support to the Haddock HTML backend.
Great!
> What would be the best way to do it? I'm thinking it could work
> similar to how classes and instances are currently rendered, so that
> type/data/newtype instances are collected and attached to type family
> declarations. Is this too simplistic? Should we render
> type/data/newtype instances as separate entities in the module
> documentation instead (and perhaps do the same thing with class
> instances)?
>
> Currently, when packages export instances that belong to classes from
> other packages, those instances are not documented anywhere. An
> advantage of having instances as separate entities in the exporting
> module documentation is that no instances are "lost".
I think the basic idea to treat class and family declarations and
instances in essentially the same way is a good.
Losing instances is of course bad for both classes and families. I
think it still makes sense to bunch the instances of one class or one
family up in a block. In fact, for type synonyms instances, there are
many applications, where this is really important for readability.
Please also remember that family declarations and instances can be
nested in class declarations and instances (as associated types).
Manuel
More information about the HaskellDoc
mailing list