Skip to content

Renaming a record (using F2 button in vscode) gives strange results #3106

Closed
@Sorokin-Anton

Description

@Sorokin-Anton

Your environment

Which OS do you use?

Windows 10, WSL
Which version of GHC do you use and how did you install it?

9.2.4, ghcup
How is your project built (alternative: link to the project)?
stack
Which LSP client (editor/plugin) do you use?
vscode

Which version of HLS do you use and how did you install it?

1.7.0.0 from ghcup

Steps to reproduce

Create a datatype with records, like

data TetrisConfig = TetrisConfig {boardSize :: (Int, Int), cellSide :: Float}

move cursor to record (boardSize) and try to rename it to qqq via F2 button

Expected behaviour

data TetrisConfig = TetrisConfig {qqq:: (Int, Int), cellSide :: Float}

Actual behaviour

data TetrisConfig = qqq {qqq :: (Int, Int), qqq :: Float}

and all other usages of constructor and all records are renamed

Debug information

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-rename-pluginstatus: needs infoNot actionable, because there's missing informationtype: 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