hs-tags

Create tag files (ctags and etags) for Haskell code.

Version on this page:0.1.5
LTS Haskell 19.33:0.1.5.3
Stackage Nightly 2022-03-17:0.1.5.3
Latest on Hackage:0.1.5.3

See all snapshots hs-tags appears in

MIT licensed by Ulf Norell, Nils Anders Danielsson, Andrés Sicard-Ramírez, Andreas Abel, Francesco Mazzoli, Paolo G. Giarrusso
Maintained by Andreas Abel
This version can be pinned in stack with:hs-tags-0.1.5@sha256:394724501069924f24406f713bb79ec2b66ec6e94da271b2a3db2171c26a74d5,1681

Module documentation for 0.1.5

There are no documented modules for this package.

hs-tags - Generate tags for Haskell code

Generate tags (ctags) or TAGS (etags) file for a bunch of Haskell files. These files are used by editors (e.g. TAGS by Emacs) to implement jump-to-definition (e.g. M-. in Emacs).

In contrast to hasktags, hs-tags uses the GHC Haskell parser to read the Haskell files and find definition sites.

Example use:

find src -name "*.*hs" | xargs \
  hs-tags --cabal Foo.cabal -i dist/build/autogen/cabal_macros.h -e

Creates Emacs TAGS from Haskell files residing in folder src/ of the project as defined in Foo.cabal, using preprocessor definitions from dist/build/autogen/cabal_macros.h.

Command line reference:

hs-tags
                --help              Show help.
  -c[FILE]      --ctags[=FILE]      Generate ctags (default file=tags)
  -e[FILE]      --etags[=FILE]      Generate etags (default file=TAGS)
  -i FILE       --include=FILE      File to #include
  -I DIRECTORY                      Directory in the include path
                --cabal=CABAL FILE  Cabal configuration to load additional
                                    language options from
                                    (library options are used)

Some related projects:

Changes

hs-tags

Version history.

0.1.5 released 2021-03-16

  • initial release
  • tested with GHC 8.0.2 - 9.0.1

Prehistory

  • originally written in Dec 2007 by Ulf Norell to generate ctags via GHC 6.8
  • extended in Feb 2008 by Nils Anders Danielsson to etags
  • since then, used in the Agda development process and updated to new GHC versions