hasktags: Produces ctags "tags" and etags "TAGS" files for Haskell programs

[ bsd3, development, library, program ] [ Propose Tags ]

Produces ctags "tags" and etags TAGS files for Haskell programs.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
debug

When set to true tokens will be print at various places. This helps understanding why hasktags does not behave the way it should

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.67, 0.68, 0.68.1, 0.68.2, 0.68.3, 0.68.4, 0.68.5, 0.68.6, 0.68.7, 0.69.0, 0.69.1, 0.69.2, 0.69.2.1, 0.69.3, 0.69.4, 0.69.5, 0.70.0, 0.70.1, 0.71.0, 0.71.1, 0.71.2, 0.72.0, 0.73.0 (info)
Dependencies base (>=4.8 && <5), bytestring (>=0.9 && <0.13), containers, directory (>=1.2.6 && <1.4), filepath, hasktags, json (>=0.5 && <0.12), microlens-platform (>=0.3.8.0 && <0.5), optparse-applicative, utf8-string [details]
License BSD-3-Clause
Copyright The University Court of the University of Glasgow
Author The GHC Team
Maintainer Jack Henahan <jhenahan@me.com>, Marc Weber <marco-oweber@gmx.de>, Marco Túlio Pimenta Gontijo <marcotmarcot@gmail.com>
Revised Revision 2 made by AndreasAbel at 2023-10-12T09:30:15Z
Category Development
Home page http://github.com/MarcWeber/hasktags
Bug tracker http://github.com/MarcWeber/hasktags/issues
Source repo head: git clone http://github.com/MarcWeber/hasktags
Uploaded by jhenahan at 2023-08-10T13:01:38Z
Distributions Arch:0.73.0, Debian:0.71.2, FreeBSD:0.69.1, LTSHaskell:0.73.0, NixOS:0.73.0, Stackage:0.73.0
Reverse Dependencies 2 direct, 0 indirect [details]
Executables hasktags
Downloads 30140 total (79 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-08-10 [all 1 reports]

Readme for hasktags-0.73.0

[back to package description]

hasktags

A tool to generate tag files for vim and emacs

What is it for? A tag file is a index containing key items of your project such as

  • function names
  • module names
  • data declarations
  • ...

So that you can find / jump to them fast.

HOWTO (GENERATING TAG FILES):

Build hasktags (standard cabal build)

Ctag format:

hasktags --ctags .

Etag format (used by emacs):

hasktags --etags .

Both formats:

hasktags --both .

NB: Generating both tags generates a file called TAGS for Emacs, and one called ctags for Vim.

HOWTO (USING TAG FILES):

ViM

let tags+=tagfile " tags,TAGS is the default setting so probably you don't have to do anything

:tjump foo<tab> or such. See :h tags

You can use a configuration like this one with Tagbar to produce a tagbar like this:

Tagbar1 Tagbar2

Enormous thanks to Alexey Radkov for the hierarchical design necessary for this usage.

NEdit

Load the "tags" file using File/Load Tags File. Use "Ctrl-D" to search for a tag.

XEmacs/Emacs

Load the "TAGS" file using "visit-tags-table" Use "M-." to search for a tag.

jedit

There is a plugin.

Tests

To run the tests, do cd testcases; sh test.sh.

History

In the past this tool was distributed with ghc. I forked and added some features. hasktags itself was moved out of the ghc repository. Then I only verified that my fork finds at least as much tags as the one forked by Igloo.

Future

Things which could be done in the future:

  • make json support optional
  • Marco TĂșlio Pimenta Gontijo proposed replacing json by aeson because it might be faster

Maintainers

See cabal file

Comments about literate haskell (lhs):

Alex no longer supports bird style ">", so should we drop support, too?

Contributors

  • Jack Henahan (maintainer)
  • Marc Weber
  • Marco TĂșlio Pimenta Gontijo
  • Nikolay Yakimov
  • Alois Cochard
  • Liyang HU
  • Ben Gamari
  • Chris Done
  • Chris Stryczynski
  • Max Nordlund gmail
  • Kwang Yul Seo
  • Pedro Rodriguez
  • Thomas Miedema
  • Vincent B
  • dnhgff
  • Alexey Radkov
  • Michael Baikov
  • Magnus Therning
  • Felix Gruber

TODO

Add all people having contributed before Oct 2012 This includes people contributing to the darcs repository as well as people having contributed when this repository has been part of ghc

Related work

And probably much more