Last active
March 3, 2021 15:42
-
-
Save jhrcek/add57d5e29cd2a65bc98cfc534882741 to your computer and use it in GitHub Desktop.
How to case split in monadic do block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Thing = A | B | C | |
getThing :: IO Thing | |
getThing = pure A | |
f :: Int -> IO () | |
f i = do | |
thing <- getThing | |
-- TODO what can I do here to make the tactics plugin offer "case split" code action? | |
case thing of | |
-- This only gives code action to "Add EmptyCase" language extension.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try this:
and then run the "Case split on thing" code action when hovering over the hole