Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/hls-tactics-plugin/src/Wingman/Tactics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ destructAll = do
_ -> Nothing
)
$ fmap (\hi -> (hi, hi_provenance hi))
$ filter (isAlgType . unCType . hi_type)
$ unHypothesis
$ jHypothesis jdg
for_ args destruct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ spec = do
destructAllTest 2 11 "DestructAllAnd.hs"
destructAllTest 4 23 "DestructAllMany.hs"
destructAllTest 2 18 "DestructAllNonVarTopMatch.hs"
destructAllTest 2 18 "DestructAllFunc.hs"

3 changes: 3 additions & 0 deletions plugins/hls-tactics-plugin/test/golden/DestructAllFunc.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
has_a_func :: Bool -> (a -> b) -> Bool
has_a_func x y = _

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
has_a_func :: Bool -> (a -> b) -> Bool
has_a_func False y = _
has_a_func True y = _