<div dir="ltr"><div>I use `hasktags -b .` in the compiler directory, and it generates a `tags` file with lines in it like</div><div><br></div><div>```</div><div>tags\021080:mkHsPar ./GHC/Hs/Utils.hs 142<br>tags\021081:mkHsParPV ./parser/RdrHsSyn.hs 1920<br>tags\021082:mkHsParPV ./parser/RdrHsSyn.hs 2019<br>tags\021083:mkHsParPV ./parser/RdrHsSyn.hs 2072<br>tags\021084:mkHsParPV ./parser/RdrHsSyn.hs 2154</div><div>```</div><div><br></div><div>This gives the full path, and emacs is happy.</div><div>And of course in this example mkHsParPV does in fact have multiple definitions, it is a class method.<br></div><div><br></div><div>Alan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 24 Oct 2019 at 12:48, Andreas Klebinger <<a href="mailto:klebinger.andreas@gmx.at">klebinger.andreas@gmx.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">Hello devs,<br>
<br>
I also often jump to files. In my case usually using VS Code using Ctr+P
as well which searches for files by name.<br>
While I can check which folder a file is in in the case of duplicates it
is a overhead which this refactor forces onto me.<br>
<br>
While there are workarounds, both for my case as for Matts. It's worth
asking if requiring these workarounds is better<br>
than just accepting redundant prefixes on module names.<br>
<br>
Personally I would prefer unique file names even at the cost of
redundancy.<br>
I rarely add import statements/full module names, but I *very* often
jump to files.<br>
<br>
Cheers<br>
Andreas<br>
<br>
<span>Bryan Richter schrieb am 23.10.2019 um 18:00:</span><br>
<blockquote type="cite">
<div dir="auto">Duplicate record fields is going to make this a bigger
problem. Vim does support duplicate tags (:tselect and :tjump and
related bindings), but hopefully haskell-ide-engine will one day provide
us with semantic tags and solve this problem once and for all!</div>
<br>
<div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 23
Oct 2019, 17.49 Matthew Pickering, <<a href="mailto:matthewtpickering@gmail.com" target="_blank">matthewtpickering@gmail.com</a>>
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Omer, Sylvain
and Sebastian<br>
<br>
.<br>
<br>
I just configured my editor to use fzf and now I can use the `:GFiles`<br>
command to perform fuzzy search on files which is probably better than<br>
tags. If anyone else is using NixOS, all I had to do was add the<br>
`fzf-vim` plugin to the vim configuration.<br>
<br>
Cheers,<br>
<br>
Matt<br>
<br>
On Wed, Oct 23, 2019 at 2:54 PM Ömer Sinan Ağacan <<a href="mailto:omeragacan@gmail.com" rel="noreferrer" target="_blank">omeragacan@gmail.com</a>> wrote:<br>
><br>
> I use a file finder (fzf) for jumping to files. Because module
names follow file<br>
> paths to jump to e.g. StgToCmmUtils.Utils I usually type
`<C-p>stgcmmutils` and<br>
> fzf finds the correct file `compiler/GHC/StgToCmm/Utils.hs`.<br>
><br>
> When generating tags I omit module names for this reason, it's easy
with a good<br>
> file finder to jump to modules already, no need to generate tags
for the<br>
> modules.<br>
><br>
> fast-tags commands I use:<br>
><br>
> - When working on the compiler:<br>
><br>
> $ fast-tags --no-module-tags driver ghc compiler<br>
><br>
> - When working on the RTS:<br>
><br>
> $ fast-tags --no-module-tags driver ghc compiler<br>
> $ ctags --append -R rts/**/*.c rts/**/*.h includes/**/*.h<br>
><br>
> - When working on the libraries:<br>
><br>
> $ fast-tags --no-module-tags driver ghc compiler libraries<br>
><br>
> Ömer<br>
><br>
> Sebastian Graf <<a href="mailto:sgraf1337@gmail.com" rel="noreferrer" target="_blank">sgraf1337@gmail.com</a>>,
23 Eki 2019 Çar, 16:49 tarihinde<br>
> şunu yazdı:<br>
> ><br>
> > FWIW, I'm using VSCode's fuzzy file search with Ctrl+P (and
vim's equivalent) rather successfully. Just tried it for Hs/Utils.hs by
typing 'hsutils.hs'. It didn't turn up as the first result in VSCode,
but it in vim.<br>
> ><br>
> > Am Mi., 23. Okt. 2019 um 14:27 Uhr schrieb Matthew Pickering
<<a href="mailto:matthewtpickering@gmail.com" rel="noreferrer" target="_blank">matthewtpickering@gmail.com</a>>:<br>
> >><br>
> >> I use `fast-tags` which doesn't look at the hierarchy at
all and I'm<br>
> >> not sure what the improvement would be as the names of the
modules<br>
> >> would still clash.<br>
> >><br>
> >> If there is some other recommended way to jump to a module
then that<br>
> >> would also work for me.<br>
> >><br>
> >> Matt<br>
> >><br>
> >><br>
> >> On Wed, Oct 23, 2019 at 12:08 PM Sylvain Henry <<a href="mailto:sylvain@haskus.fr" rel="noreferrer" target="_blank">sylvain@haskus.fr</a>> wrote:<br>
> >> ><br>
> >> > Hi,<br>
> >> ><br>
> >> > How do you generate your tags file? It seems to be a
shortcoming of the<br>
> >> > generator to not take into account the location of
the definition file.<br>
> >> ><br>
> >> > > Perhaps `HsUtils` and `StgUtils` would be
appropriate to<br>
> >> > disambiguate`Hs/Utils` and `StgToCmm/Utils`.<br>
> >> ><br>
> >> > We are promoting the module prefixes (`Hs`, `Stg`,
`Tc`, etc.) into<br>
> >> > proper module layers (e.g. `HsUtils` becomes
`GHC.Hs.Utils`) so it would<br>
> >> > be redundant to add the prefixes back. :/<br>
> >> ><br>
> >> > Cheers,<br>
> >> > Sylvain<br>
> >> ><br>
> >> > On 23/10/2019 12:52, Matthew Pickering wrote:<br>
> >> > > Hi,<br>
> >> > ><br>
> >> > > The module rework has broken my workflow.<br>
> >> > ><br>
> >> > > Now my tags file is useless for jumping for
modules as there are<br>
> >> > > multiple "Utils" and "Types" modules. Invariable
I am jumping to the<br>
> >> > > wrong one. What do other people do to avoid
this?<br>
> >> > ><br>
> >> > > Can we either revert these changes or give these
modules unique names<br>
> >> > > to facilitate that only reliable way of
navigating the code base.<br>
> >> > > Perhaps `HsUtils` and `StgUtils` would be
appropriate to disambiguate<br>
> >> > > `Hs/Utils` and `StgToCmm/Utils`.<br>
> >> > ><br>
> >> > > Cheers,<br>
> >> > ><br>
> >> > > Matt<br>
> >> > > _______________________________________________<br>
> >> > > ghc-devs mailing list<br>
> >> > > <a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
> >> > > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
> >> > _______________________________________________<br>
> >> > ghc-devs mailing list<br>
> >> > <a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
> >> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
> >> _______________________________________________<br>
> >> ghc-devs mailing list<br>
> >> <a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
> >> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
> ><br>
> > _______________________________________________<br>
> > ghc-devs mailing list<br>
> > <a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
> > <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" rel="noreferrer" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br></blockquote></div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
ghc-devs mailing list
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>