Hasktags
Produces ctags "tags" and etags "TAGS" files for Haskell programs
Install / Use
/learn @MarcWeber/HasktagsREADME
Tags generator using proper GHC API
Related work
- ghc-tags Uses proper GHC API thus not missing some tags
- https://github.com/bitc/lushtags
- https://github.com/elaforge/fast-tags
- http://kingfisher.nfshost.com/sw/gasbag/
- http://hackage.haskell.org/package/hothasktags
- http://majutsushi.github.com/tagbar/
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
- ...
Old but eventually useful tool using its own fuzzy parsing which has advantages and disadvantages. See ghc-tags to learn about alternatives.
Install
- clone this repo
cdinto the repo directory- run
cabal install. You should get output similar toSymlinking 'hasktags' to '/Users/user/.cabal/bin/hasktags' - source your shell profile. Alternatively you can open a new terminal window
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:

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
And probably much more
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
