Hello! This happens when formatting long Haskell type signatures with brittany, which will then break up the type signature to multiple lines (normally it is a single line). In this case ctags seems to emit a reference to the second line of the type signature, which is too generic and matches other locations too.
The name of the parser: (not sure what the parser refers to, but Haskell?)
The command line you used to run ctags:
$ ctags --options=NONE /tmp/ctest/foo.hs
The content of input file:
module Foo () where
thing
:: App m
=> Int
-> m Int
thing x = pure x
The tags output you are not satisfied with:
...
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 6.1.0 /v6.1.0/
Foo /tmp/ctest/foo.hs /^module Foo () where$/;" m
thing /tmp/ctest/foo.hs /^ :: App m$/;" f
thing /tmp/ctest/foo.hs /^thing x = pure x$/;" f
The tags output you expect:
Not sure, but the first regex that matches thing to the second line of the multi-line type signature is not ok. Since that regex happens multiple times in the file (for different functions), doing a tag-based navigation in vim would jump to a likely wrong location.
For my usecase it could work if the type signature-y tagline would be omitted. More generally, a more specific match should be generated somehow (multi-line match, that includes the first line of the type sig too?).
Hello! This happens when formatting long Haskell type signatures with brittany, which will then break up the type signature to multiple lines (normally it is a single line). In this case ctags seems to emit a reference to the second line of the type signature, which is too generic and matches other locations too.
The name of the parser: (not sure what the parser refers to, but Haskell?)
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect:
Not sure, but the first regex that matches
thing
to the second line of the multi-line type signature is not ok. Since that regex happens multiple times in the file (for different functions), doing a tag-based navigation in vim would jump to a likely wrong location.For my usecase it could work if the type signature-y tagline would be omitted. More generally, a more specific match should be generated somehow (multi-line match, that includes the first line of the type sig too?).
The version of ctags:
How do you get ctags binary:
Arch pacman.