gasbag: ctags and etags from haskell code

gasbag is a program for generating ctags and etags files from Haskell code. I wrote it because hasktags didn't meet my needs.

It is notable for attempting to choose the best available definition for a given tag. For example, consider the following small Haskell program, in which there are three bindings for var.

main = let var = 9 -- the "outermost" definition in let var = "abcd" in let var = True in print var
gasbag chooses the “outermost” definition.

One advantage over hasktags is that gasbag will notice bindings that don't have an accompanying type signature. However, it is inferior to hasktags in the following respects:

  • If a file is not valid Haskell (which obviously can occur if the file is being edited) then gasbag will be unable to use it. (However, it can be told to use the tags generated on the previous run.)
  • It doesn't understand successor patterns (also known as n + k patterns).
  • It understands only a few Haskell extensions.
The current release of gasbag is 0.5. The software and its documentation may be used as if they were in the public domain.

A manual page is available. There is also a tarball which contains the source code, the manual page, and installation instructions (also available here). gasbag has few dependencies and should be easy to install.

If you want to send comments, feature requests, or bug reports, you'll find my contact details here.