Doc.vim - Haddocks from Vim (Re: [Haskell-cafe] Proposal: simple interface to libraries Haddock)

Claus Reinke claus.reinke at
Sat Mar 3 13:45:57 EST 2007

> Again, the problem with this script is that it requires you know the
> package name for the function you're looking up. I see this as an
> over-burdenous requirement on the user. 

okay. sometimes i know/guess the module i'm looking for, but not the item.
sometimes i recall the item i'm looking for, but not what module it was in. 
but it does seem less likely that i know the package as well.

> My guess is that any haddock script that offers similar functionality will 
> have the same requirement.

not necessarily. that was just the first attempt.

attached is an updated vim script file, with an indexed variant of the Doc
command. the index is simply a nested dictionary, populated from haddock's
index files (not very helpful format, btw). so now you can type

    :IDoc "runState"
    Type number of click with mouse (<Enter> cancels): 1

(the first time round, this will build the index first) and launch opera on


> This is why something more search-orientated like Hoogle is required, I guess.

it is natural for Hoogle to incorporate search-like functionalities beyond its
original call (searching for items based on their types), if they fit easily into its 
existing framework. but here we are talking about a straightforward dictionary 
lookup in Haddock's index files.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Doc.vim
Type: application/octet-stream
Size: 3778 bytes
Desc: not available
Url :

More information about the Haskell-Cafe mailing list