Skip to content

Wingman: case split on variable deletes existing function definition #1542

Closed
@jhrcek

Description

@jhrcek

Your environment

haskell-language-server version: 1.0.0.0 (GHC: 8.8.4) (PATH: /home/jhrcek/.local/bin/haskell-language-server-wrapper) (GIT hash: 94573be3144fa47da0ebe547b62f0e172f48c40d)
Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.10.4

Which lsp-client do you use: vscode

Steps to reproduce

data A = A | B | C

some :: A -> IO ()
some a = do
    foo
    bar a
  where
      foo = putStrLn "Hi"
      
      bar :: A -> IO ()
      bar x = _ -- hover over this hole and pick "Case split on x"

Expected behaviour

Case split should only affect the helper function bar and should not delete existing code.

Actual behaviour

caseSplitBug

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: wingmantype: 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