haskell / haskell/haskell-language-server
Delete unused binding code action doesn't delete haddock
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
The delete unused binding code action seems to leave the Haddock attached to the binding it was meant to delete.
### Your environment
Which OS do you use? NixOs
Which version of GHC do you use and how did you install it? 9.10.2
How is your project built (alternative: link to the project)? cabal-install
Which LSP client (editor/plugin) do you use? emacs+lsp-mode
Which version of HLS do you use and how did you install it? 2.11.0.0
Have you configured HLS in any way (especially: a `hie.yaml` file)? not particularly
### Steps to reproduce
If I have a definition like:
```
module Foo () where
{- | My haddock goes here
-}
foo :: Int
foo = ...
```
and `foo` is unused, then I get a code action to delete `foo`.
If I trigger this code action then the definition of `foo` is deleted by the haddock comment is left, even though it is attached to `foo`.
### Expected behaviour
I would expect the Haddock docstring to also get deleted.
### Actual behaviour
The Haddock docstring is not deleted.
### Debug information
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.