Skip to content

Commit 1d2458b

Browse files
committed
Clean up Wingman
1 parent 14b5425 commit 1d2458b

File tree

111 files changed

+145
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+145
-196
lines changed

plugins/hls-tactics-plugin/hls-tactics-plugin.cabal

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ build-type: Simple
1515
extra-source-files:
1616
README.md
1717
test/golden/*.cabal
18-
test/golden/*.expected
1918
test/golden/*.hs
2019
test/golden/*.yaml
2120

@@ -43,17 +42,17 @@ library
4342
Wingman.KnownStrategies
4443
Wingman.KnownStrategies.QuickCheck
4544
Wingman.LanguageServer
46-
Wingman.LanguageServer.TacticProviders
4745
Wingman.LanguageServer.Metaprogram
46+
Wingman.LanguageServer.TacticProviders
4847
Wingman.Machinery
4948
Wingman.Metaprogramming.Lexer
5049
Wingman.Metaprogramming.Parser
5150
Wingman.Metaprogramming.ProofState
5251
Wingman.Naming
5352
Wingman.Plugin
54-
Wingman.StaticPlugin
5553
Wingman.Range
5654
Wingman.Simplify
55+
Wingman.StaticPlugin
5756
Wingman.Tactics
5857
Wingman.Types
5958

@@ -79,21 +78,21 @@ library
7978
, ghc-exactprint
8079
, ghc-source-gen
8180
, ghcide ^>=1.3
81+
, hls-graph
8282
, hls-plugin-api ^>=1.1
83+
, hyphenation
8384
, lens
8485
, lsp
86+
, megaparsec ^>=9
8587
, mtl
88+
, parser-combinators
89+
, prettyprinter
8690
, refinery ^>=0.3
8791
, retrie >=0.1.1.0
88-
, hls-graph
8992
, syb
9093
, text
9194
, transformers
9295
, unordered-containers
93-
, hyphenation
94-
, megaparsec ^>=9
95-
, parser-combinators
96-
, prettyprinter
9796

9897
default-language: Haskell2010
9998
default-extensions:
@@ -154,7 +153,7 @@ test-suite tests
154153
, ghcide
155154
, hls-plugin-api
156155
, hls-tactics-plugin
157-
, hls-test-utils ^>= 1.0
156+
, hls-test-utils ^>=1.0
158157
, hspec
159158
, hspec-expectations
160159
, lens
Lines changed: 57 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.AutoSpec where
94

@@ -19,72 +14,72 @@ spec = do
1914
autoTestNoWhitespace = goldenTestNoWhitespace Auto ""
2015

2116
describe "golden" $ do
22-
autoTest 11 8 "AutoSplitGADT.hs"
23-
autoTest 2 11 "GoldenEitherAuto.hs"
24-
autoTest 4 12 "GoldenJoinCont.hs"
25-
autoTest 3 11 "GoldenIdentityFunctor.hs"
26-
autoTest 7 11 "GoldenIdTypeFam.hs"
27-
autoTest 2 15 "GoldenEitherHomomorphic.hs"
28-
autoTest 2 8 "GoldenNote.hs"
29-
autoTest 2 12 "GoldenPureList.hs"
30-
autoTest 2 12 "GoldenListFmap.hs"
31-
autoTest 2 13 "GoldenFromMaybe.hs"
32-
autoTest 2 10 "GoldenFoldr.hs"
33-
autoTest 2 8 "GoldenSwap.hs"
34-
autoTest 4 11 "GoldenFmapTree.hs"
35-
autoTest 7 13 "GoldenGADTAuto.hs"
36-
autoTest 2 12 "GoldenSwapMany.hs"
37-
autoTest 4 12 "GoldenBigTuple.hs"
38-
autoTest 2 10 "GoldenShow.hs"
39-
autoTest 2 15 "GoldenShowCompose.hs"
40-
autoTest 2 8 "GoldenShowMapChar.hs"
41-
autoTest 7 8 "GoldenSuperclass.hs"
42-
autoTest 2 12 "GoldenSafeHead.hs"
43-
autoTest 2 12 "FmapBoth.hs"
44-
autoTest 7 8 "RecordCon.hs"
45-
autoTest 6 8 "NewtypeRecord.hs"
46-
autoTest 2 14 "FmapJoin.hs"
47-
autoTest 2 9 "Fgmap.hs"
48-
autoTest 4 19 "FmapJoinInLet.hs"
49-
autoTest 9 12 "AutoEndo.hs"
50-
autoTest 2 16 "AutoEmptyString.hs"
51-
autoTest 7 35 "AutoPatSynUse.hs"
52-
autoTest 2 28 "AutoZip.hs"
53-
autoTest 2 17 "AutoInfixApply.hs"
54-
autoTest 2 19 "AutoInfixApplyMany.hs"
55-
autoTest 2 25 "AutoInfixInfix.hs"
17+
autoTest 11 8 "AutoSplitGADT"
18+
autoTest 2 11 "GoldenEitherAuto"
19+
autoTest 4 12 "GoldenJoinCont"
20+
autoTest 3 11 "GoldenIdentityFunctor"
21+
autoTest 7 11 "GoldenIdTypeFam"
22+
autoTest 2 15 "GoldenEitherHomomorphic"
23+
autoTest 2 8 "GoldenNote"
24+
autoTest 2 12 "GoldenPureList"
25+
autoTest 2 12 "GoldenListFmap"
26+
autoTest 2 13 "GoldenFromMaybe"
27+
autoTest 2 10 "GoldenFoldr"
28+
autoTest 2 8 "GoldenSwap"
29+
autoTest 4 11 "GoldenFmapTree"
30+
autoTest 7 13 "GoldenGADTAuto"
31+
autoTest 2 12 "GoldenSwapMany"
32+
autoTest 4 12 "GoldenBigTuple"
33+
autoTest 2 10 "GoldenShow"
34+
autoTest 2 15 "GoldenShowCompose"
35+
autoTest 2 8 "GoldenShowMapChar"
36+
autoTest 7 8 "GoldenSuperclass"
37+
autoTest 2 12 "GoldenSafeHead"
38+
autoTest 2 12 "FmapBoth"
39+
autoTest 7 8 "RecordCon"
40+
autoTest 6 8 "NewtypeRecord"
41+
autoTest 2 14 "FmapJoin"
42+
autoTest 2 9 "Fgmap"
43+
autoTest 4 19 "FmapJoinInLet"
44+
autoTest 9 12 "AutoEndo"
45+
autoTest 2 16 "AutoEmptyString"
46+
autoTest 7 35 "AutoPatSynUse"
47+
autoTest 2 28 "AutoZip"
48+
autoTest 2 17 "AutoInfixApply"
49+
autoTest 2 19 "AutoInfixApplyMany"
50+
autoTest 2 25 "AutoInfixInfix"
5651

5752
failing "flaky in CI" $
58-
autoTest 2 11 "GoldenApplicativeThen.hs"
53+
autoTest 2 11 "GoldenApplicativeThen"
5954

6055
failing "not enough auto gas" $
61-
autoTest 5 18 "GoldenFish.hs"
56+
autoTest 5 18 "GoldenFish"
6257

6358
describe "theta" $ do
64-
autoTest 12 10 "AutoThetaFix.hs"
65-
autoTest 7 20 "AutoThetaRankN.hs"
66-
autoTest 6 10 "AutoThetaGADT.hs"
67-
autoTest 6 8 "AutoThetaGADTDestruct.hs"
68-
autoTest 4 8 "AutoThetaEqCtx.hs"
69-
autoTest 6 10 "AutoThetaEqGADT.hs"
70-
autoTest 6 8 "AutoThetaEqGADTDestruct.hs"
71-
autoTest 6 10 "AutoThetaRefl.hs"
72-
autoTest 6 8 "AutoThetaReflDestruct.hs"
59+
autoTest 12 10 "AutoThetaFix"
60+
autoTest 7 20 "AutoThetaRankN"
61+
autoTest 6 10 "AutoThetaGADT"
62+
autoTest 6 8 "AutoThetaGADTDestruct"
63+
autoTest 4 8 "AutoThetaEqCtx"
64+
autoTest 6 10 "AutoThetaEqGADT"
65+
autoTest 6 8 "AutoThetaEqGADTDestruct"
66+
autoTest 6 10 "AutoThetaRefl"
67+
autoTest 6 8 "AutoThetaReflDestruct"
7368

7469
describe "known" $ do
75-
autoTest 25 13 "GoldenArbitrary.hs"
70+
autoTest 25 13 "GoldenArbitrary"
7671
autoTestNoWhitespace
77-
6 10 "KnownBigSemigroup.hs"
78-
autoTest 4 10 "KnownThetaSemigroup.hs"
79-
autoTest 6 10 "KnownCounterfactualSemigroup.hs"
80-
autoTest 10 10 "KnownModuleInstanceSemigroup.hs"
81-
autoTest 4 22 "KnownDestructedSemigroup.hs"
82-
autoTest 4 10 "KnownMissingSemigroup.hs"
83-
autoTest 7 12 "KnownMonoid.hs"
84-
autoTest 7 12 "KnownPolyMonoid.hs"
85-
autoTest 7 12 "KnownMissingMonoid.hs"
72+
6 10 "KnownBigSemigroup"
73+
autoTest 4 10 "KnownThetaSemigroup"
74+
autoTest 6 10 "KnownCounterfactualSemigroup"
75+
autoTest 10 10 "KnownModuleInstanceSemigroup"
76+
autoTest 4 22 "KnownDestructedSemigroup"
77+
autoTest 4 10 "KnownMissingSemigroup"
78+
autoTest 7 12 "KnownMonoid"
79+
autoTest 7 12 "KnownPolyMonoid"
80+
autoTest 7 12 "KnownMissingMonoid"
8681

8782

8883
describe "messages" $ do
89-
mkShowMessageTest allFeatures Auto "" 2 8 "MessageForallA.hs" TacticErrors
84+
mkShowMessageTest allFeatures Auto "" 2 8 "MessageForallA" TacticErrors
9085

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.DestructAllSpec where
94

@@ -18,25 +13,25 @@ spec = do
1813
describe "provider" $ do
1914
mkTest
2015
"Requires args on lhs of ="
21-
"DestructAllProvider.hs" 3 21
16+
"DestructAllProvider" 3 21
2217
[ (not, DestructAll, "")
2318
]
2419
mkTest
2520
"Can't be a non-top-hole"
26-
"DestructAllProvider.hs" 8 19
21+
"DestructAllProvider" 8 19
2722
[ (not, DestructAll, "")
2823
, (id, Destruct, "a")
2924
, (id, Destruct, "b")
3025
]
3126
mkTest
3227
"Provides a destruct all otherwise"
33-
"DestructAllProvider.hs" 12 22
28+
"DestructAllProvider" 12 22
3429
[ (id, DestructAll, "")
3530
]
3631

3732
describe "golden" $ do
38-
destructAllTest 2 11 "DestructAllAnd.hs"
39-
destructAllTest 4 23 "DestructAllMany.hs"
40-
destructAllTest 2 18 "DestructAllNonVarTopMatch.hs"
41-
destructAllTest 2 18 "DestructAllFunc.hs"
33+
destructAllTest 2 11 "DestructAllAnd"
34+
destructAllTest 4 23 "DestructAllMany"
35+
destructAllTest 2 18 "DestructAllNonVarTopMatch"
36+
destructAllTest 2 18 "DestructAllFunc"
4237

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.DestructPunSpec where
94

@@ -17,9 +12,9 @@ spec = do
1712
let destructTest = goldenTest DestructPun
1813

1914
describe "golden" $ do
20-
destructTest "x" 4 9 "PunSimple.hs"
21-
destructTest "x" 6 10 "PunMany.hs"
22-
destructTest "x" 11 11 "PunGADT.hs"
23-
destructTest "x" 17 11 "PunManyGADT.hs"
24-
destructTest "x" 4 12 "PunShadowing.hs"
15+
destructTest "x" 4 9 "PunSimple"
16+
destructTest "x" 6 10 "PunMany"
17+
destructTest "x" 11 11 "PunGADT"
18+
destructTest "x" 17 11 "PunManyGADT"
19+
destructTest "x" 4 12 "PunShadowing"
2520

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.DestructSpec where
94

@@ -17,23 +12,23 @@ spec = do
1712
let destructTest = goldenTest Destruct
1813

1914
describe "golden" $ do
20-
destructTest "gadt" 7 17 "GoldenGADTDestruct.hs"
21-
destructTest "gadt" 8 17 "GoldenGADTDestructCoercion.hs"
22-
destructTest "a" 7 25 "SplitPattern.hs"
23-
destructTest "a" 6 18 "DestructPun.hs"
24-
destructTest "fp" 31 14 "DestructCthulhu.hs"
15+
destructTest "gadt" 7 17 "GoldenGADTDestruct"
16+
destructTest "gadt" 8 17 "GoldenGADTDestructCoercion"
17+
destructTest "a" 7 25 "SplitPattern"
18+
destructTest "a" 6 18 "DestructPun"
19+
destructTest "fp" 31 14 "DestructCthulhu"
2520

2621
describe "layout" $ do
27-
destructTest "b" 4 3 "LayoutBind.hs"
28-
destructTest "b" 2 15 "LayoutDollarApp.hs"
29-
destructTest "b" 2 18 "LayoutOpApp.hs"
30-
destructTest "b" 2 14 "LayoutLam.hs"
31-
destructTest "x" 11 15 "LayoutSplitWhere.hs"
32-
destructTest "x" 3 12 "LayoutSplitClass.hs"
33-
destructTest "b" 3 9 "LayoutSplitGuard.hs"
34-
destructTest "b" 4 13 "LayoutSplitLet.hs"
35-
destructTest "a" 4 7 "LayoutSplitIn.hs"
36-
destructTest "a" 4 31 "LayoutSplitViewPat.hs"
37-
destructTest "a" 7 17 "LayoutSplitPattern.hs"
38-
destructTest "a" 8 26 "LayoutSplitPatSyn.hs"
22+
destructTest "b" 4 3 "LayoutBind"
23+
destructTest "b" 2 15 "LayoutDollarApp"
24+
destructTest "b" 2 18 "LayoutOpApp"
25+
destructTest "b" 2 14 "LayoutLam"
26+
destructTest "x" 11 15 "LayoutSplitWhere"
27+
destructTest "x" 3 12 "LayoutSplitClass"
28+
destructTest "b" 3 9 "LayoutSplitGuard"
29+
destructTest "b" 4 13 "LayoutSplitLet"
30+
destructTest "a" 4 7 "LayoutSplitIn"
31+
destructTest "a" 4 31 "LayoutSplitViewPat"
32+
destructTest "a" 7 17 "LayoutSplitPattern"
33+
destructTest "a" 8 26 "LayoutSplitPatSyn"
3934

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.IntrosSpec where
94

@@ -17,5 +12,5 @@ spec = do
1712
let introsTest = goldenTest Intros ""
1813

1914
describe "golden" $ do
20-
introsTest 2 8 "GoldenIntros.hs"
15+
introsTest 2 8 "GoldenIntros"
2116

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
{-# LANGUAGE DataKinds #-}
2-
{-# LANGUAGE DuplicateRecordFields #-}
3-
{-# LANGUAGE OverloadedStrings #-}
4-
{-# LANGUAGE ScopedTypeVariables #-}
5-
{-# LANGUAGE TypeOperators #-}
6-
{-# LANGUAGE ViewPatterns #-}
1+
{-# LANGUAGE OverloadedStrings #-}
72

83
module CodeAction.RefineSpec where
94

@@ -18,11 +13,11 @@ spec = do
1813
let refineTest = goldenTest Refine ""
1914

2015
describe "golden" $ do
21-
refineTest 2 8 "RefineIntro.hs"
22-
refineTest 2 8 "RefineCon.hs"
23-
refineTest 4 8 "RefineReader.hs"
24-
refineTest 8 8 "RefineGADT.hs"
16+
refineTest 2 8 "RefineIntro"
17+
refineTest 2 8 "RefineCon"
18+
refineTest 4 8 "RefineReader"
19+
refineTest 8 8 "RefineGADT"
2520

2621
describe "messages" $ do
27-
mkShowMessageTest allFeatures Refine "" 2 8 "MessageForallA.hs" NothingToDo
22+
mkShowMessageTest allFeatures Refine "" 2 8 "MessageForallA" NothingToDo
2823

0 commit comments

Comments
 (0)