-
-
Notifications
You must be signed in to change notification settings - Fork 388
Renaming in presence of type errors #3799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thank you for your bug report! Likely, the rename handler uses I agree, renaming doesn't make sense if the module doesn't compile. I think, we should have two modi, for local renames only, we require that the module we look at compiles, for cross module renaming, the whole project needs to compile successfully. This should be simple enough to fix in https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-rename-plugin/src/Ide/Plugin/Rename.hs#L232. Instead of |
Prefer `useE` over `useWithStaleE`
Prefer `useE` over `useWithStaleE`
Prefer `useE` over `useWithStaleE`
Prefer `useE` over `useWithStaleE`
Prefer `useE` over `useWithStaleE`
Your environment
Which OS do you use?
Fedora
Which version of GHC do you use and how did you install it?
9.6.2 from ghcup
How is your project built (alternative: link to the project)?
Which LSP client (editor/plugin) do you use?
vim+coc.nvim
Which version of HLS do you use and how did you install it?
Have you configured HLS in any way (especially: a
hie.yaml
file)?no
Steps to reproduce
Use the following file
Try to rename the
X
data type toX'
.Expected behaviour
Either nothing should be changed or everything even in presence of type errors.
Actual behaviour
i.e. non of the
X
occurrences in the defintiion ofX
ora
changed, only its occurrence in theEq
instance.Debug information
The text was updated successfully, but these errors were encountered: