hs-tags

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

Version on this page:0.1.5.1
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.1@sha256:2f2ccb1f4a09845820562533d1b026fb2337e76e01de8a63dd8c234f75d3a446,1751

Module documentation for 0.1.5.1

There are no documented modules for this package.

Hackage version Hackage CI hs-tags on Stackage Nightly Stackage LTS version Cabal build

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.1 Andreas Abel 2021-08-22

  • fixed #3: correctly obtain GHC’s libdir

0.1.5 Andreas Abel 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