Open guibou opened 3 months ago
Hi, thanks for the bug report! Iirc, this feature is implemented by retrie
. Is this reproducible with retrie
as well, or only in HLS?
I manually test it in retrie, It is retrie's problem.
Issue created in retire https://github.com/facebookincubator/retrie/issues/71
Thank you for the test with retrie
Given that retrie is apparently not being actively maintained, perhaps we should deprecate the retrie plugin?
@michaelpj
Given that retrie is apparently not being actively maintained, perhaps we should deprecate the retrie plugin?
Yes, for sure. However, the fold / unfold (e.g. replace symbol by implementation) is part of our refactoring logic (we export "deprecated" pattern synonyms and "smart constructor" and ask our (internal) users to just unfold at call site using the code action.
This thing is a terrific quality of life tool. Do you think a subset of retrie
can be imported into HLS in order to keep at least the "replace by implementation" code action?
edit I really have the feeling that I'm programming with "The Rocq Prover" in my haskell editor and that's something which makes me like my job ;)
I mean, we don't need to take it out urgently, perhaps retrie
will continue to work for a while. But in the long run either someone needs to keep it going or write a replacement.
Your environment
Which OS do you use? Linux Which version of GHC do you use and how did you install it?
Tested with ghc 9.6.5 and 9.8.2 installed with nix.
How is your project built (alternative: link to the project)?
Single file
Which LSP client (editor/plugin) do you use?
neovim + neovim-lsp
Which version of HLS do you use and how did you install it?
2.9.0.0 installed from nixpkgs.
Have you configured HLS in any way (especially: a
hie.yaml
file)?No hie file, single file support
Steps to reproduce
The following file:
The code action on the
foo
call, calledinline foo
Expected behaviour
foo
(inbar
)should be replaced by equivalent piece of code, so I assume something like:(or something equivalent).
Actual behaviour
Looks like only the first case of
foo
implementation is taken into account, and hence, I get:See for yourself:
https://github.com/user-attachments/assets/a0ad59d3-4c41-41e0-b71b-9f606181efa7
Debug information