hasktags icon indicating copy to clipboard operation
hasktags copied to clipboard

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

Open arybczak opened this issue 9 years ago • 3 comments

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.

arybczak avatar May 04 '15 19:05 arybczak

This works though:

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

Note the extra indentation.

thomie avatar Dec 13 '15 13:12 thomie

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.

arybczak avatar Dec 22 '15 14:12 arybczak

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

jhenahan avatar May 13 '18 23:05 jhenahan