while trying to get into the GHC.hs-business, I wrote a little
addition to ghci/InteractiveUI.hs. as this is my first attempt in this
area, please take it with a grain of salt, but the idea is to make use
of available information and add a new command:

    :tags  -- creates a "tags" file for the currently loaded modules

supports Vim tags files only, sorry  (on the small examples I tried,
it is a definite improvement over hasktags, so it would be worth 
adding this anyway). cvs diff attached.

I had a look into supporting Emacs as well, but the TAGS files 
format is somewhat underdocumented as "the format between 
etags and emacs..". From looking at code and example files, it
seems that Emacsens not only group tags by file (and possibly
store the line prefix instead of just the tag?), but insist on 
counting lines and character positions for each tag, *both* 
counted from the beginning of the file - can that be right? 

If yes, neither ghci nor any other sensible non-emacs tool will 
ever have enough information stored to produce TAGS files, so
one would have to make an extra pass over each source file to
extract the character positions for the tags lines..

suggestions? comments?

cheers,
claus

ps. is there any specification for TAGS files apart from etags.el?

Attachment: InteractiveUI.hs.diff
Description: Binary data

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to