Skip to content

Commit 2f3300e

Browse files
committed
Fix suggestNewDefinition tests
1 parent b0e117b commit 2f3300e

File tree

1 file changed

+2
-3
lines changed
  • plugins/hls-refactor-plugin/src/Development/IDE/Plugin/Plugins

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import Data.Bifunctor (Bifunctor (..))
77
import Data.Either.Extra (maybeToEither)
88
import qualified Data.Text as T
99
import Development.IDE.GHC.Compat
10-
import Development.IDE.GHC.Compat.ExactPrint (exactPrint,
11-
makeDeltaAst)
10+
import Development.IDE.GHC.Compat.ExactPrint (exactPrint)
1211
import Development.IDE.GHC.Error (spanContainsRange)
1312
import Development.IDE.GHC.ExactPrint (genAnchor1,
1413
modifyMgMatchesT',
@@ -120,7 +119,7 @@ appendFinalPatToMatches name = \case
120119
addArgumentAction :: ParsedModule -> Range -> T.Text -> Maybe T.Text -> Either PluginError [(T.Text, [TextEdit])]
121120
addArgumentAction (ParsedModule _ moduleSrc _ _) range name _typ = do
122121
(newSource, _, _) <- runTransformT $ do
123-
(moduleSrc', join -> matchedDeclNameMay) <- addNameAsLastArgOfMatchingDecl (makeDeltaAst moduleSrc)
122+
(moduleSrc', join -> matchedDeclNameMay) <- addNameAsLastArgOfMatchingDecl moduleSrc
124123
case matchedDeclNameMay of
125124
Just (matchedDeclName, numPats) -> modifySigWithM (unLoc matchedDeclName) (addTyHoleToTySigArg numPats) moduleSrc'
126125
Nothing -> pure moduleSrc'

0 commit comments

Comments
 (0)