-----------------------------------------------------------------------------
-- bugs

* don't link to M.x if M.x is re-exported via a 'module N' from module M.

* Pick the preferred export names as per the paper.

* instances: need to construct instances for deriving clauses, somehow.

* A module re-export should only reference the target module if the
  target module is imported without hiding any of its exports (otherwise
  we should inline just the exported bits).

* pay attention to import specs!

* remove the s/r conflicts I added to the grammar

* check handling of special types ([], (), (,) etc.)

* Support for the rest of GHC extensions in the parser:
  - implicit parameters
  - scoped type variables (return types left to do).

* Be a bit cleaner about error cases: some internal errors can be
  generated by bugs in the Haskell source.  Divide out the proper
  internal error cases and emit proper error messages.

-----------------------------------------------------------------------------
-- features

* Top-level package docs

* Do the unlitting/CPPing from Haddock itself so we get the source file
  links right.

* Allow linking to a section name?

* attributes for individual declarations, eg.
    -- #abstract
  or targetted to a specific decl:
    -- #T: abstract

  #long, #short, #noinstances (on a type or class)

* facilities for saving interfaces so that you can run Haddock against
  something that isn't the Prelude.

* Allow documentation annotations to explicitly name the entity they
  refer to.

* In the contents page, indicate portability/stability of each module
  somehow.

* Add back-references from the definition to the uses of types/classes
  (perhaps in the index?)

* Add a link to the defining location of a re-exported entity

* fixities

* include file revision info in module headers

-----------------------------------------------------------------------------
-- cosmetic

* for a constructor, don't fill its entire cell with a grey background.

* switch to longer rendering form for datatypes when necessary?

* remove extra whitespace from the generated HTML to save space