Ticket #7 (closed defect: wontfix)

Opened 5 years ago

Last modified 5 years ago

:Doc does not work

Reported by: sol Owned by: claus
Priority: major Milestone:
Component: ftplugin/haskell_doc.vim Version: latest (please provide version in text)
Keywords: Cc:


With http://projects.haskell.org/haskellmode-vim/vimfiles/haskellmode-20090424.vba the :Doc command does not work. In line 236 DocBrowser? is called with an insufficient path.

Uncommenting line 234 and commenting line 235 seems to fix this.

Change History

Changed 5 years ago by claus

Thanks for the report, but there is a good reason that :Doc is undocumented!-)

It was one of the early interfaces, but turned out to be really inconvenient and unreliable, as it needs too much user input and then tries to guess the documentation urls (the newer, documented, versions instead look up the correct urls in the Haddock indices). With the change you suggest, that may work at the moment, for stuff in the base package, or if you explicitly specify both module and package, also for packages that came with GHC, but it won't work for other installed packages.

The only reason :Doc still exists is because of its shortcuts to GHC docs (-top, -libs, -guide). I'm tempted to make any other call an error, as this has been deprecated and undocumented for long enough.

Could you please let me know why you need to use :Doc, in case I need to provide an additional alternative? Current alternatives are:

  • _?,_?1,_?2 local documentation lookup, hoogle/hayoo! search for qualified or unqualified id under cursor
  • :MDoc <module> for module documentation lookup
  • :IDoc <unqual> shouldn't really be needed anymore, but looks up docs for unqualified ids, via the index

Changed 5 years ago by sol

I just read the source code and tried the examples given with the source code documentation of :Doc. I think we can resolve this by just stating in the source code that it is either deprecated or only useful for -top, -libs and -guide.

Changed 5 years ago by claus

  • status changed from new to closed
  • resolution set to wontfix

Ok, thanks. I've done this in my local copy, so it'll be in the next update.

Note: See TracTickets for help on using tickets.