Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jhrcek opened this issue Mar 9, 2021 · 1 comment · Fixed by #1543
Closed

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

jhrcek opened this issue Mar 9, 2021 · 1 comment · Fixed by #1543
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@jhrcek
Copy link
Collaborator

jhrcek commented Mar 9, 2021

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

@isovector isovector added component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Mar 9, 2021
@isovector
Copy link
Collaborator

Great timing! I was just looking for a test case for this.

@mergify mergify bot closed this as completed in #1543 Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wingman type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants