Skip to content

Commit bfafbeb

Browse files
author
Santiago Weight
committed
refact: remove unnecessary cpp
1 parent 1041a25 commit bfafbeb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import Development.IDE.Plugin.CodeAction.PositionIndexed
5757
import Development.IDE.Plugin.CodeAction.Util
5858
import Development.IDE.Plugin.Completions.Types
5959
import qualified Development.IDE.Plugin.Plugins.AddArgument
60+
import Development.IDE.Plugin.Plugins.Diagnostic
6061
import Development.IDE.Plugin.TypeLenses (suggestSignature)
6162
import Development.IDE.Types.Exports
6263
import Development.IDE.Types.Location
@@ -92,7 +93,6 @@ import qualified Text.Fuzzy.Parallel as TFP
9293
import Text.Regex.TDFA (mrAfter,
9394
(=~), (=~~))
9495
#if MIN_VERSION_ghc(9,2,0)
95-
import Development.IDE.Plugin.Plugins.Diagnostic
9696
import GHC (AddEpAnn (AddEpAnn),
9797
Anchor (anchor_op),
9898
AnchorOperation (..),
@@ -171,9 +171,7 @@ bindingsPluginDescriptor recorder plId = mkExactprintPluginDescriptor recorder $
171171
, wrap suggestImplicitParameter
172172
#endif
173173
, wrap suggestNewDefinition
174-
#if MIN_VERSION_ghc(9,2,1)
175174
, wrap Development.IDE.Plugin.Plugins.AddArgument.plugin
176-
#endif
177175
, wrap suggestDeleteUnusedBinding
178176
]
179177
plId

plugins/hls-refactor-plugin/src/Development/IDE/Plugin/Plugins/AddArgument.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
{-# LANGUAGE CPP #-}
12
module Development.IDE.Plugin.Plugins.AddArgument (plugin) where
23

34
#if !MIN_VERSION_ghc(9,2,1)
5+
import qualified Data.Text as T
6+
import Language.LSP.Types
7+
48
plugin :: [(T.Text, [TextEdit])]
59
plugin = []
610
#else
@@ -19,7 +23,7 @@ import GHC (EpAnn (..),
1923
import GHC.Hs (IsUnicodeSyntax (..))
2024
import Language.Haskell.GHC.ExactPrint.Transform (d1)
2125
import Development.IDE.GHC.Compat
22-
import Development.IDE
26+
import Development.IDE.GHC.Error ( spanContainsRange )
2327
import Language.LSP.Types
2428
import qualified Data.Text as T
2529
import Development.IDE.GHC.ExactPrint (modifyMgMatchesT', modifySigWithM, modifySmallestDeclWithM, genAnchor1)

0 commit comments

Comments
 (0)