[Haskell-cafe] Re: How to browse code written by others

Peter Hercek phercek at gmail.com
Sat Jun 19 07:36:58 EDT 2010

Hi Claus,

On 06/15/2010 05:57 PM, Claus Reinke wrote:
>> If you go this route, I will shamelessly promote hothasktags instead
>> of ghci.  It generates proper tags for qualified imports.
> What do you mean by "proper" here?

I think Luke means that if you use qualified names then hothasktags can 
give you better location information than current ghci ctags.
I discussed this with Luke before and I sumarrized what would need to be 
done to imporove ghci ctags to support qualified names better. Here is 
the post which explains it with an example:


With this addition, I believe, ghci tags would at least as good as 
hothasktags. That said I do not try hothasktags. Do hothasktags do 
analyzes deep enough that the information provided is always correct?

I did not go to add this to ghci ctags since I barely ever use qualified 
names so it is a non-issue for me. Also propper support for scoped tags 
would include some vim macro which (on ^] key-press) tries to find a 
qualified name first and only after a failure it would try to find plain 
name without qualification. So if one wants to use it well he/she needs 
first select the name in visual mode and only then pres ^]. (Or one 
should use full ex commands for navigation like :tselect.)

> but in Vim 7.2 the help file still says
>    http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#tags-file-format
>    The only other field currently recognized by Vim is "file:"
>    (with an empty value).  It is used for a static tag.
> If Vim somehow started supporting that extended file:<scope>
> format without updating its docs, that would be good to know
> (what version of Vim? where is this documented?).

I did not find it documented but it looks like a filename can be used in 
place of <scope>. If provided then the validity of the tag is limited to 
the filename.

> Your suggested use-case for such a feature is interesting, but
> we're getting into an area where "live" calls to a scope resolution 
> tool might make more sense.

Och I would like to have a "vim" with full incremental parser for 
Haskell ... with things like AST being drawn in a pane, intellisense and 
completion on symbols but also on grammar/syntax, re-factoring options 
and all the goodies this could provide. It will not be a vim any more. 
Probably won't happen in my lifetime either but I can dream :)


PS: Thanks for your vim support.

More information about the Haskell-Cafe mailing list