Closed
Description
Add to import list code action is broken with GHC 9.2, because it does not includes comma between symbols:
Your environment
Which OS do you use: Linux
Which LSP client (editor/plugin) do you use: Neovim + lsp_config
Describe your project (alternative: link to the project): standalone file
Steps to reproduce
Test with the following file:
import Data.List.NonEmpty (fromList)
a = case fromList [1,2,3] of
a :| l -> "boo"
Error should complain about :|
not being in scope, and a code action should propose to add :|
to the import list of Data.List.NonEmpty
. You can execute the code action.
Expected behaviour
Code action should change the import list to something valid, such as (fromList, NonEmpty((:|)))
.
Actual behaviour
Executing the code action changes the import list from (fromList)
to (fromListNonEmpty((:|))
effectively missing the comma, generating a parse error.