Skip to content

Renaming a record data constructor also renames record fields #4358

Closed
@Innf107

Description

@Innf107

Your environment

Which OS do you use? Arch Linux

Which version of GHC do you use and how did you install it? GHC 9.4.7 via stack

How is your project built (alternative: link to the project)? stack (https://github.com/Innf107/vega)

Which LSP client (editor/plugin) do you use?: vscode-haskell

Which version of HLS do you use and how did you install it? 2.4.0.0, automatically installed by vscode-haskell

Have you configured HLS in any way (especially: a hie.yaml file)? no

Steps to reproduce

Define a record and try to rename the constructor like this: https://www.youtube.com/watch?v=VO_1D_cThv8

I tried to reproduce this with a more recent HLS version with plain GHC or cabal but I couldn't get that one to support renaming anything at all. Pressing enter after renaming would just not do anything and not print anything in the logs.

Debug information

The logs include

[Error - 5:45:34 PM] Request textDocument/foldingRange failed.
  Message: codeRange: Rule Failed: GetCodeRange
  Code: -32803 

when I try to rename the identifier

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triagetype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions