From 6505f57c3ea4715307a9cd518893be45529064f7 Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Tue, 18 May 2021 08:44:43 -0700 Subject: [PATCH 1/3] Refine should either do intros or split, not both --- plugins/hls-tactics-plugin/src/Wingman/Tactics.hs | 5 +---- .../hls-tactics-plugin/test/CodeAction/RefineSpec.hs | 10 +++++----- .../test/golden/RefineGADT.expected.hs | 2 +- plugins/hls-tactics-plugin/test/golden/RefineGADT.hs | 2 +- .../test/golden/RefineReader.expected.hs | 2 +- plugins/hls-tactics-plugin/test/golden/RefineReader.hs | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/plugins/hls-tactics-plugin/src/Wingman/Tactics.hs b/plugins/hls-tactics-plugin/src/Wingman/Tactics.hs index 6f3d36354b..52855e1ffe 100644 --- a/plugins/hls-tactics-plugin/src/Wingman/Tactics.hs +++ b/plugins/hls-tactics-plugin/src/Wingman/Tactics.hs @@ -381,10 +381,7 @@ localTactic t f = do refine :: TacticsM () -refine = do - try' intros - try' splitSingle - try' intros +refine = intros <%> splitSingle auto' :: Int -> TacticsM () diff --git a/plugins/hls-tactics-plugin/test/CodeAction/RefineSpec.hs b/plugins/hls-tactics-plugin/test/CodeAction/RefineSpec.hs index 6a4aa11feb..e0f69a5780 100644 --- a/plugins/hls-tactics-plugin/test/CodeAction/RefineSpec.hs +++ b/plugins/hls-tactics-plugin/test/CodeAction/RefineSpec.hs @@ -13,11 +13,11 @@ spec = do let refineTest = goldenTest Refine "" describe "golden" $ do - refineTest 2 8 "RefineIntro" - refineTest 2 8 "RefineCon" - refineTest 4 8 "RefineReader" - refineTest 8 8 "RefineGADT" + refineTest 2 8 "RefineIntro" + refineTest 2 8 "RefineCon" + refineTest 4 10 "RefineReader" + refineTest 8 10 "RefineGADT" describe "messages" $ do - mkShowMessageTest allFeatures Refine "" 2 8 "MessageForallA" NothingToDo + mkShowMessageTest allFeatures Refine "" 2 8 "MessageForallA" TacticErrors diff --git a/plugins/hls-tactics-plugin/test/golden/RefineGADT.expected.hs b/plugins/hls-tactics-plugin/test/golden/RefineGADT.expected.hs index c3c463b2c8..1562e12171 100644 --- a/plugins/hls-tactics-plugin/test/golden/RefineGADT.expected.hs +++ b/plugins/hls-tactics-plugin/test/golden/RefineGADT.expected.hs @@ -5,5 +5,5 @@ data GADT a where Two :: GADT Bool test :: z -> GADT Int -test z = One (\ b -> _) +test z = One _ diff --git a/plugins/hls-tactics-plugin/test/golden/RefineGADT.hs b/plugins/hls-tactics-plugin/test/golden/RefineGADT.hs index 04fa6ee1a4..6ac2853173 100644 --- a/plugins/hls-tactics-plugin/test/golden/RefineGADT.hs +++ b/plugins/hls-tactics-plugin/test/golden/RefineGADT.hs @@ -5,5 +5,5 @@ data GADT a where Two :: GADT Bool test :: z -> GADT Int -test = _ +test z = _ diff --git a/plugins/hls-tactics-plugin/test/golden/RefineReader.expected.hs b/plugins/hls-tactics-plugin/test/golden/RefineReader.expected.hs index 570bb31c33..d7f536ef1f 100644 --- a/plugins/hls-tactics-plugin/test/golden/RefineReader.expected.hs +++ b/plugins/hls-tactics-plugin/test/golden/RefineReader.expected.hs @@ -1,5 +1,5 @@ newtype Reader r a = Reader (r -> a) test :: b -> Reader r a -test b = Reader (\ r -> _) +test b = Reader _ diff --git a/plugins/hls-tactics-plugin/test/golden/RefineReader.hs b/plugins/hls-tactics-plugin/test/golden/RefineReader.hs index cf4df0cd91..9e68e115e9 100644 --- a/plugins/hls-tactics-plugin/test/golden/RefineReader.hs +++ b/plugins/hls-tactics-plugin/test/golden/RefineReader.hs @@ -1,5 +1,5 @@ newtype Reader r a = Reader (r -> a) test :: b -> Reader r a -test = _ +test b = _ From 9be1c48af5528abad3d53cce89c49724e0e63c0c Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Tue, 18 May 2021 09:03:23 -0700 Subject: [PATCH 2/3] Empty commit for CI From b22ae96c899254b2c4406736c3bb126f67b0597b Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Tue, 18 May 2021 11:46:29 -0700 Subject: [PATCH 3/3] Another commit for CI