rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.32k stars 94 forks source link

Feature/create stub #633

Closed mbwgh closed 3 years ago

mbwgh commented 3 years ago

This PR allows the user to create a stub to satisfy a typed hole, for example for a scenario described here.

Example:

process :: M.Map String Int -> Bool
process = M.foldl' _ False

can be converted to

process :: M.Map String Int -> Bool
process = M.foldl' go False

go :: Bool -> Int -> Bool
go = undefined

via an Intention Action (i.e. by pressing alt+Enter when the cursor is over the typed hole).

rikvdkleij commented 3 years ago

@mbwgh Thanks!!