Haddock/Development ideas

From HaskellWiki
< Haddock
Revision as of 12:19, 17 December 2012 by Benmachine (talk | contribs) (Removing ideas that are now implemented or irrelevant.)

Jump to: navigation, search

Most of these ideas are very old, but some may still be relevant.

  • It would be good to have a recursive flag that would operate on all the .hs and .lhs files under a single directory.
  • Haddock should emit the documentation about instances. For example, it's important to document that the Data.Map instance of Foldable only folds over the values and not the keys.
  • There should be an annotation to include a function's entire definition in the documentation. This would be useful for functions like (.) and mapM where the definition is the clearest possible documentation, and for QuickCheck properties that specify the behavior of a library.
  • There should be an option to include a simplified implementation of a function that is equivalent to the one in the code. For instance, instead of showing a complex implementation of List.length that makes use of stream fusion we could show a simple one based on foldl'.
  • Optionally show qualifications of identifiers, that is print Sequence.map rather than map, Music.T rather than just T. The option for haddock could be --qualification QUAL
    • none (default) strip off qualification (just map)
    • orig show the identifiers as they are written in the module (e.g. map or List.map)
    • full show all identifiers with full qualification (Data.List.map)