I am looking for a ctags equivalent to Haskell. I tried hasktags, but it have some problems:
In the source folder of enumerator, run hasktags .
gives:
hasktags: tags: openFile: resource busy (file is locked)
And when I run vim -t enumFile
, an error occurs:
E431: Format error in tags file "tags"
Before byte 4085
E426: tag not found: enumFile
I also tried gasbag, but it doesn't compile on ghc-7.0.4.
You are using Mac OS X (or Windows, see below), aren't you?
In that case, hasktags -c
(which only creates Vi-format tags) would fix your problem.
That's not the only explanation, but here's what happens on an OS X system:
tags
(for Vi) and TAGS
(for Emacs)Update: as pointed out by a comment, Windows is also case insensitive, so similar problems might arise.
hasktags has some bugs, one of which is that it uses lazy IO, which tends to give those resource busy errors.
As it happens, I just wrote a tags program, at http://hackage.haskell.org/package/fast-tags
Other options are hothasktags, which makes qualified Module.function tags, and lushtags, which is designed to integrate with a fancy IDE-like vim tagbar thingy. In my experience hothasktags generates giant tags files and lushtags crashes as soon as it can't parse a file. Both use haskell-src-exts which means they are accurate, but will crash if they can't parse your file, and can't deal with .hsc files. fast-tags has its own parser, which means it doesn't have those problems, but is also more vulnerable to parsing bugs that miss tags or give bogus tags.
As you noticed, gasbag (and htags) use haskell-src which means they only work on Haskell 98.
Disclaimer: if by TAGS you mean emacs tags, fast-tags doesn't do those yet, though if someone cared it would be easy to add.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With