Skip to content

Commit 19d4c8f

Browse files
committed
Drop redundant argument
1 parent 34b055e commit 19d4c8f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ghcide/src/Development/IDE/Plugin/CodeAction.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,18 +1093,20 @@ constructNewImportSuggestions exportsMap (qual, thingMissing) notTheseModules =
10931093
, identInfo <- maybe [] Set.toList $ Map.lookup name (getExportsMap exportsMap)
10941094
, canUseIdent thingMissing identInfo
10951095
, moduleNameText identInfo `notElem` fromMaybe [] notTheseModules
1096-
, suggestion <- renderNewImport identInfo (moduleNameText identInfo)
1096+
, suggestion <- renderNewImport identInfo
10971097
]
10981098
where
1099-
renderNewImport :: IdentInfo -> T.Text -> [T.Text]
1100-
renderNewImport identInfo m
1099+
renderNewImport :: IdentInfo -> [T.Text]
1100+
renderNewImport identInfo
11011101
| Just q <- qual
11021102
, asQ <- if q == m then "" else " as " <> q
11031103
= ["import qualified " <> m <> asQ]
11041104
| otherwise
11051105
= ["import " <> m <> " (" <> renderImportStyle importStyle <> ")"
11061106
| importStyle <- NE.toList $ importStyles identInfo] ++
11071107
["import " <> m ]
1108+
where
1109+
m = moduleNameText identInfo
11081110

11091111
canUseIdent :: NotInScope -> IdentInfo -> Bool
11101112
canUseIdent NotInScopeDataConstructor{} = isDatacon

0 commit comments

Comments
 (0)