
I love emacs' tags-query-replace function, which allows me to do a search-and-replace across an entire repo. But to do that I need a TAGS file that, at least, lists all the Hsakell files in GHC. What is the approved way to construct a TAGS file for a bunch of Haskell modules? Is this documented anywhere? Thanks Simon

I generally use hasktags (install via cabal-install), and you can give it a list of directories to index. I normally do it in the GHC/compiler directory, so it has just the GHC source Alan On Mon, 5 Sept 2022 at 20:51, Simon Peyton Jones < simon.peytonjones@gmail.com> wrote:
I love emacs' tags-query-replace function, which allows me to do a search-and-replace across an entire repo. But to do that I need a TAGS file that, at least, lists all the Hsakell files in GHC.
What is the approved way to construct a TAGS file for a bunch of Haskell modules? Is this documented anywhere?
Thanks
Simon _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Simon Peyton Jones
I love emacs' tags-query-replace function, which allows me to do a search-and-replace across an entire repo. But to do that I need a TAGS file that, at least, lists all the Hsakell files in GHC.
What is the approved way to construct a TAGS file for a bunch of Haskell modules? Is this documented anywhere?
I haven't tried this recently on GHC but my first instinct would be to use hasktags [1]: $ cabal install hasktags $ hasktags --etags ./compiler At some point in the past I would have said that ideally Hadrian would be able to build such a thing. However, at this point TAGS files are slowly falling out of fashion in favor of language servers. Another way to reach a similar end would be to rather search-and-replace across all git-tracked files. However, somewhat surprisingly, a bit of Googling didn't turn up any easy way of accomplishing this. The closest I can find is [1]. Cheers, - Ben [1] https://emacs.stackexchange.com/questions/37286/find-and-replace-a-text-amon...
participants (3)
-
Alan & Kim Zimmerman
-
Ben Gamari
-
Simon Peyton Jones