2009/3/15 Jeff Wheeler <j...@nokrev.com>: > > On Sat, 2009-03-14 at 21:53 +0100, David Waern wrote: > >> Perhaps yi could just look up the installed Haddock doc string for >> each command? The haddock library provides this ability. > > I'm interested in this, but the Haddock docs on Hackage [1] don't seem > to provide much API at all; I haven't used Haddock much, so I'm probably > missing something.
The API is very rough, and quite unusable at the moment due to `NameCacheAccessor` not being exported. This type and some helper functions to create it will be exported in the next version (coming soon), so then it should at least be usable. What you can do then is to read the .haddock file of Yi using `readInterfaceFile` and obtain a mapping `instDocMap :: Map Name (HsDoc DocName)` for a particular yi module. You can then pretty-print `HsDoc DocName` in a form suitable for display in yi. Ideas for how to make the API less rough are welcome. I'm also thinking of moving it to Documentation.Haddock.* David --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list yi-devel@googlegroups.com http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---