Closed
Description
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
module X where
data X a where
X :: X Int
Y :: X String
Z :: X Int
a :: X Int
a = X
-- this doesn't type check on purpose:
instance Eq X where
(==) = \_ _ -> True
Try to rename the X
data type to X'
.
Expected behaviour
Either nothing should be changed or everything even in presence of type errors.
Actual behaviour
module X where
data X a where
X :: X Int
Y :: X String
Z :: X Int
a :: X Int
a = X
-- this doesn't type check on purpose:
instance Eq X' where
(==) = \_ _ -> True
i.e. non of the X
occurrences in the defintiion of X
or a
changed, only its occurrence in the Eq
instance.