Skip to content

Commit e123f49

Browse files
VenInffendor
andauthored
Apply suggestions from code review
Co-authored-by: fendor <[email protected]>
1 parent 8dec88c commit e123f49

File tree

1 file changed

+4
-4
lines changed
  • plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal

1 file changed

+4
-4
lines changed

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/CabalAdd.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ addDependencySuggestCodeAction recorder plId verTxtDocId suggestions haskellFile
149149
targets -> pure $ concat [mkCodeAction cabalFilePath (Just $ buildTargetToStringRepr target) <$>
150150
suggestions | target <- targets]
151151
where
152-
-- | Note the use of `pretty` funciton.
152+
-- | Note the use of `pretty` function.
153153
-- It converts the `BuildTarget` to an acceptable string representation.
154154
-- It will be used in as the input for `cabal-add`'s `executeConfig`.
155155
buildTargetToStringRepr target = render $ Pretty.pretty $ buildTargetComponentName target
@@ -274,9 +274,9 @@ getDependencyEdit recorder env cabalFilePath buildTarget dependency = do
274274
case executeConfig (validateChanges origPackDescr) (Config {..}) of
275275
Nothing -> throwE $ PluginInternalError $ T.pack $ "Cannot extend build-depends in " ++ cabalFilePath
276276
Just newContents -> do
277-
let edit = diffText caps (verTxtDocId, T.decodeUtf8 cnfOrigContents) (T.decodeUtf8 newContents) SkipDeletions
278-
logWith recorder Debug $ LogCreatedEdit edit
279-
pure edit
277+
let edit = diffText caps (verTxtDocId, T.decodeUtf8 cnfOrigContents) (T.decodeUtf8 newContents) SkipDeletions
278+
logWith recorder Debug $ LogCreatedEdit edit
279+
pure edit
280280

281281
-- | Given a path to a haskell file, returns the closest cabal file.
282282
-- If cabal file wasn't found, gives Nothing.

0 commit comments

Comments
 (0)