diff options
author | David Waern <david.waern@gmail.com> | 2008-07-13 13:09:16 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-07-13 13:09:16 +0000 |
commit | fe2a7afdfcceb85e4678eaa4ab54b51a9e890c68 (patch) | |
tree | 9e51530f62cc5e78395eccda396f5c751581872b /src/Haddock/Utils | |
parent | fdd8e13d1462e63556a90bdaecf694bc7ba4c10c (diff) |
Refactoring in H.Interface.Create
We were creating a doc map, a declaration map and a list of entities
separately by going through the HsGroup. These structures were all used
to build the interface of a module.
Instead of doing this, we can start by creating a list of declarations
from the HsGroup, then collect the docs directly from this list
(instead of using the list of entities), creating a documentation map.
We no longer need the Entity data type, and we can store a single
map from names to declarations and docs in the interface, instead of
the declaration map and the doc map.
This way, there is only one place where we filter out the declarations
that we don't want, and we can remove a lot of code.
Another advantage of this is that we can create the exports directly
out of the list of declarations when we export the full module contents.
(Previously we did a look up for each name to find the declarations).
This is faster and removes another point where we depend on names to
identify exported declarations, which is good because it eliminates
problems with instances (which don't have names).
Diffstat (limited to 'src/Haddock/Utils')
0 files changed, 0 insertions, 0 deletions