[Haskell-cafe] ANNOUNCE: fast-tags-0.0.1

Evan Laforge qdunkan at gmail.com
Sun Apr 1 00:23:48 CEST 2012

A while back I was complaining about the profusion of poorly
documented tags generators.  Well, there is still a profusion of
poorly documented tags generators... I was able to find 5 of them.

So, that said, here's my contribution to the problem: fast-tags,
haskell tag generator #6.

Why not use one of the other 5?

Two of them use haskell-src which means they can't parse my code.  Two
more use haskell-src-exts, which is slow and fragile, breaks on
partially edited source, and doesn't understand hsc.  Then there's the
venerable hasktags, but it's buggy and the source is a mess.  I fixed
a bug where it doesn't actually strip comments so it makes tags to
things inside comments, but then decided it would be easier to just
write my own.

fast-tags is fast because it has a parser that's just smart enough to
pick out the tags.  It can tagify my entire 300 module program in
about a second.  But it's also incremental, so it only needs to do
that the first time.  I have vim's BufWrite autocommand bound to
updating the tags every time a file is written, and it's fast enough
that I've never noticed the delay.  It understands hsc directly
(that's trivial, just ignore the # lines) so there's no need to run
hsc2hs before tagifying.  The result is tags which are automatically
up to date all the time, which is nice.

If people care about lhs and emacs tags then it wouldn't be hard to
support those too, and at that point I could replace hasktags and we'd
be back down to 5 again.  But I'm not even sure anyone uses hasktags,
since surely someone would have noticed that comment bug.

Anyway, it's been working great for me for a couple weeks so I
uploaded it to hackage: http://hackage.haskell.org/package/fast-tags

More information about the Haskell-Cafe mailing list