MarcWeber / hasktags

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

The first data constructor tagged as a type constructor #41

Closed heroin-moose closed 6 years ago

heroin-moose commented 6 years ago

For this kind of code

module Main where

data Foo = A | B | C | D | E | F

hasktags produces output that marks A as a type costructor (d), not data constructor (cons):

$ hasktags -x -c -o - test.hs
!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_NAME  hasktags
A   test.hs /^data Foo = A | B | C | D | E | F$/;"  d   line:3  language:Haskell
B   test.hs /^data Foo = A | B | C | D | E | F$/;"  cons    line:3  language:Haskell
C   test.hs /^data Foo = A | B | C | D | E | F$/;"  cons    line:3  language:Haskell
D   test.hs /^data Foo = A | B | C | D | E | F$/;"  cons    line:3  language:Haskell
E   test.hs /^data Foo = A | B | C | D | E | F$/;"  cons    line:3  language:Haskell
F   test.hs /^data Foo = A | B | C | D | E | F$/;"  cons    line:3  language:Haskell
Foo test.hs /^data Foo = A | B | C | D | E | F$/;"  d   line:3  language:Haskell
Main    test.hs /^module Main where$/;" m   line:1  language:Haskell
jhenahan commented 6 years ago

Fixed by #44.