Description
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:
foo x y
| x == 0 = y
| otherwise = x + y
bar = foo 1 2
The code action on the foo
call, called inline foo
Expected behaviour
foo
(in bar
)should be replaced by equivalent piece of code, so I assume something like:
bar = if 1 == 0 then 2 else 1 + 2
(or something equivalent).
Actual behaviour
Looks like only the first case of foo
implementation is taken into account, and hence, I get:
bar = 2
See for yourself: