MarcWeber / hasktags

Produces ctags "tags" and etags "TAGS" files for Haskell programs
Other
127 stars 32 forks source link

Add --options, --version and refactor #54

Closed tvestelind closed 5 years ago

tvestelind commented 6 years ago

Hi,

I would like to make Hasktags more compatible with the vim plugin vim-gutentags (https://github.com/ludovicchabant/vim-gutentags). I think that vim-gutentags is quite a nice plugin with some very handy features and it would be great if people could easily use it together with Hasktags.

Part of the requirements that vim-gutentags have is that the tags generator must support --options and --recurse. There are some more flags that are required for features such as giving custom commands for which files to parse, in that case you would need -L, and -L would take a file which contains files for which tags should be generated.

I set out to implement --options as a first step. GetOpt is really hard to work with so I ended up changing it for optparse-applicative which I think looks really nice. I've implemented --options and I've fixed the changes that hlint.

So what I'm wondering:

If you think that this is good, then I can:

Thanks in advance

jhenahan commented 6 years ago

Refactoring to use optparse-applicative was on my roadmap, so thanks for this effort. I’ll review and let you know. I’d certainly love to provide compatibility with more tools.

tvestelind commented 6 years ago

Nice! It would be great to be able help with something.

I've noticed that stack test fails and --cache seems to have a bug. I'll see if I can figure one/both out and open PRs.

jhenahan commented 6 years ago

Tests are failing because of some test cases I’m trying to solve, but I’ll be restructuring the repo to get those out of the releases. Feel free to look into the failing cases, though! :)

MarcWeber commented 6 years ago

This patch seems to include https://github.com/MarcWeber/hasktags/pull/49