Skip to content

Add command for case splitting #70

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

Merged
merged 1 commit into from
Jul 12, 2018
Merged

Add command for case splitting #70

merged 1 commit into from
Jul 12, 2018

Conversation

txsmith
Copy link
Contributor

@txsmith txsmith commented Apr 20, 2018

This PR accompanies haskell/haskell-ide-engine#530.

Example:

f :: Either Int String -> [Char]
f e = "Hello World"

put your cursor in front of the e identifier and run Haskell: Split case.
The result should be:

f :: Either Int String -> [Char]
f (Left e) = "Hello World"
f (Right e) = "Hello World"

It works as long as the cursor is on the identifier that you wish to generate pattern matches for.
Let me know what you think!

@Tehnix
Copy link
Contributor

Tehnix commented May 8, 2018

Awesome! Let's merge this as soon as haskell/haskell-ide-engine#530 gets merged :)

@alanz
Copy link
Collaborator

alanz commented Jul 12, 2018

@txsmith Can you resolve the conflicts, so we can get this merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants