Skip to content

Commit 86d63ff

Browse files
committed
Cleanup
1 parent 67ddf23 commit 86d63ff

File tree

9 files changed

+5
-28
lines changed

9 files changed

+5
-28
lines changed

plugins/hls-tactics-plugin/src/Wingman/CodeGen.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ mkDestructPat already_in_scope con names
140140

141141
in (names', )
142142
$ ConPatIn (noLoc $ Unqual $ occName $ conLikeName con)
143-
-- $ ConPat NoExtField (noLoc $ Unqual $ occName $ conLikeName con)
144143
$ RecCon
145144
$ HsRecFields rec_fields Nothing
146145
| otherwise =
@@ -186,7 +185,7 @@ conLikeInstOrigArgTys'
186185
-- ^ Types of arguments to the ConLike with returned type is instantiated with the second argument.
187186
conLikeInstOrigArgTys' con uniTys =
188187
let exvars = conLikeExTys con
189-
in map scaledThing $ conLikeInstOrigArgTys con $
188+
in fmap scaledThing $ conLikeInstOrigArgTys con $
190189
uniTys ++ fmap mkTyVarTy exvars
191190
-- Rationale: At least in GHC <= 8.10, 'dataConInstOrigArgTys'
192191
-- unifies the second argument with DataCon's universals followed by existentials.

plugins/hls-tactics-plugin/src/Wingman/Context.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Development.IDE.GHC.Compat.Util
1111
import Wingman.GHC (normalizeType)
1212
import Wingman.Judgements.Theta
1313
import Wingman.Types
14-
-- import GHC.Tc.Utils.TcType (tcSplitPhiTy, tcSplitTyConApp)
1514

1615

1716
mkContext

plugins/hls-tactics-plugin/src/Wingman/EmptyCase.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ scrutinzedType :: EmptyCaseSort Type -> Maybe Type
8787
scrutinzedType (EmptyCase ty) = pure ty
8888
scrutinzedType (EmptyLamCase ty) =
8989
case tacticsSplitFunTy ty of
90-
(_, _, tys, _) -> listToMaybe $ map scaledThing tys
90+
(_, _, tys, _) -> listToMaybe $ fmap scaledThing tys
9191

9292

9393
------------------------------------------------------------------------------

plugins/hls-tactics-plugin/src/Wingman/GHC.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import Data.Traversable
1717
import Development.IDE.GHC.Compat
1818
import Development.IDE.GHC.Compat.Util
1919
import GHC.SourceGen (lambda)
20-
-- import GHC.Tc.Utils.TcType (tcSplitSigmaTy, tcSplitNestedSigmaTys, tcSplitFunTys, tyCoVarsOfTypeList)
2120
import Generics.SYB (Data, everything, everywhere, listify, mkQ, mkT)
2221
import Wingman.StaticPlugin (pattern MetaprogramSyntax)
2322
import Wingman.Types
@@ -197,7 +196,6 @@ pattern SingleLet bind pats val expr <-
197196
HsLet _
198197
(L _ (HsValBinds _
199198
(ValBinds _ (bagToList ->
200-
-- [L _ (FunBind _ (L _ bind) (MG _ (L _ [L _ (AMatch _ pats val)]) _) _ _)]) _)))
201199
[L _ (FunBind {fun_id = (L _ bind), fun_matches = (MG _ (L _ [L _ (AMatch _ pats val)]) _)})]) _)))
202200
(L _ expr)
203201

plugins/hls-tactics-plugin/src/Wingman/Naming.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import Data.Traversable
1717
import Development.IDE.GHC.Compat.Core hiding (IsFunction)
1818
import Text.Hyphenation (hyphenate, english_US)
1919
import Wingman.GHC (tcTyVar_maybe)
20-
-- import GHC.Tc.Utils.TcType (tcSplitFunTys, isBoolTy, isIntegerTy, isIntTy, isFloatingTy, isStringTy, tcSplitAppTys)
2120

2221

2322
------------------------------------------------------------------------------

plugins/hls-tactics-plugin/src/Wingman/Tactics.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ intros' params = rule $ \jdg -> do
131131
case tacticsSplitFunTy $ unCType g of
132132
(_, _, [], _) -> cut -- failure $ GoalMismatch "intros" g
133133
(_, _, scaledArgs, res) -> do
134-
let args = map scaledThing scaledArgs
134+
let args = fmap scaledThing scaledArgs
135135
ctx <- ask
136136
let gen_names = mkManyGoodNames (hyNamesInScope $ jEntireHypothesis jdg) args
137137
occs = case params of

plugins/hls-tactics-plugin/test/UnificationSpec.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import Test.QuickCheck
1818
import Wingman.GHC
1919
import Wingman.Machinery (newUnivar)
2020
import Wingman.Types
21-
-- import GHC.Tc.Utils.TcType (tcGetTyVar_maybe)
2221

2322

2423
spec :: Spec

plugins/hls-tactics-plugin/test/Utils.hs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ mkGoldenTest eq tc occ line col input =
118118
-- use stale data will get uptodate stuff
119119
void $ waitForTypecheck doc
120120
actions <- getCodeActions doc $ pointRange line col
121-
-- <<<<<<< HEAD
122121
case find ((== Just (tacticTitle tc occ)) . codeActionTitle) actions of
123122
Just (InR CodeAction {_command = Just c}) -> do
124123
executeCommand c
@@ -131,23 +130,7 @@ mkGoldenTest eq tc occ line col input =
131130
expected <- liftIO $ T.readFile expected_name
132131
liftIO $ edited `eq` expected
133132
_ -> error $ show actions
134-
-- =======
135-
-- Just (InR CodeAction {_command = Just c})
136-
-- <- pure $ find ((== Just (tacticTitle tc occ)) . codeActionTitle) actions
137-
-- executeCommand c
138-
-- resp <- skipManyTill anyMessage (Right <$> message SWorkspaceApplyEdit <|> Left <$> message SWindowShowMessage)
139-
-- case resp of
140-
-- Left nm -> liftIO $ expectationFailure $ "Expected WorkspaceApplyEdit.\nInstead got message:\n " ++ show (nm ^. params . J.message)
141-
-- Right _ -> pure ()
142-
-- edited <- documentContents doc
143-
-- let expected_name = input <.> "expected" <.> "hs"
144-
-- -- Write golden tests if they don't already exist
145-
-- liftIO $ (doesFileExist expected_name >>=) $ flip unless $ do
146-
-- T.writeFile expected_name edited
147-
-- expected <- liftIO $ T.readFile expected_name
148-
-- liftIO $ edited `eq` expected
149-
150-
-- >>>>>>> 75a7d853084c8e83a3f8ea4d92799b5ade8ede3f
133+
151134

152135
mkCodeLensTest
153136
:: FilePath

stack-9.0.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ flags:
9393
embed: true
9494

9595
nix:
96-
packages: [ icu libcxx zlib darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.Cocoa ]
96+
packages: [ icu libcxx zlib ]
9797

9898
concurrent-tests: false

0 commit comments

Comments
 (0)