MarcWeber / hasktags

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

Invalid tags output #85

Open isovector opened 2 years ago

isovector commented 2 years ago

The tags output from hasktags gives me an error in vim:

Format error in tags file "tags"
Before byte 82685

Byte 82685 points to this:

(_
:<|>getAccountFeatureConfigClientM
:<|>_
:<|>_
)   services/galley/src/Galley/Intra/User.hs    237

which is generated via this code:

getAccountFeatureConfigClientM ::
  UserId -> Client.ClientM TeamFeatureStatusNoConfig
( _
    :<|> getAccountFeatureConfigClientM
    :<|> _
    :<|> _
  ) = Client.client (Proxy @IAPI.API)

Removing this entry from tags fixes the file.

carbolymer commented 10 months ago

I'm having the same issue. Sample input file: https://github.com/input-output-hk/cardano-base/blob/b769eeac6c0f8e33a81501f51a4e3cd99fbc39d9/cardano-crypto-class/src/Cardano/Crypto/MonadSodium.hs

Running hasktags produces invalid output:

$ hasktags -c -o - cardano-base/cardano-crypto-class/src/Cardano/Crypto/MonadSodium.hs
(
MonadSodium(..) cardano-base/cardano-crypto-class/src/Cardano/Crypto/MonadSodium.hs     18
Cardano.Crypto.MonadSodium      cardano-base/cardano-crypto-class/src/Cardano/Crypto/MonadSodium.hs     17

Error from neovim:

E431: Format error in tags file "tags"
Before byte 2