luqui / hothasktags

A haskell ctags implementation that is aware of qualified imports, among other cool stuff
BSD 3-Clause "New" or "Revised" License
30 stars 16 forks source link

Anonymous modules & duplicate module names #11

Open istathar opened 11 years ago

istathar commented 11 years ago

So hothasktags doesn't seem to generate tags for with source files lacking module declarations. Is that deliberate?

I have a fair number of code snippets sitting around, and I just realized that I wasn't able to jump around within such files as I can in normal ones. Might be nice. Presumably I can attack that by dealing with the Nothing module name case when parsing, if you say it's ok to have a go at.

A related matter is that if you have files TheoreticalSnippet.hs and ExperimentalSnippet.hs both with

module Snippet where

then tags get generated for the first file but not the second. This would presumably be something to do with the Map being used. That might be a bit more involved to deal with, and I wanted to check with you that you weren't relying on the behaviour of keys being merged.

AfC

luqui commented 11 years ago

I haven't dug into the code for a while, but I don't recall doing anything tricky. If you unionWith instead of union (or however it plays out) everything should be fine.