MarcWeber / hasktags

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

Hasktags doesn't pick up ADT accessors defined using specific syntax #16

Open arybczak opened 9 years ago

arybczak commented 9 years ago

Hey,

Consider a file (let's call it tags.hs) with the following contents:

data T = T {
  t1 :: Int
, t2 :: Int
, t3 :: Int
, t4 :: Int
, t5 :: Int
}

When hasktags is run with this file as an argument, it produces the following output:

T   tags.hs 1
T   tags.hs 1
t1  tags.hs 2

It doesn't seem to pick up any accessor other than the first one in such case.

thomie commented 8 years ago

This works though:

data T = T {
      t1 :: Int
    , t2 :: Int
    , t3 :: Int
    , t4 :: Int
    , t5 :: Int
}

Note the extra indentation.

arybczak commented 8 years ago

Sure, but if one has already a lot of the code in the form I posted, changing it because hasktags can't parse it is a bit of a pain.

jhenahan commented 6 years ago

I've added some testcases for this to see if I can work something out.