Skip to content

Commit d725541

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

File tree

1 file changed

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

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,13 @@ hover :: PluginMethodHandler IdeState LSP.Method_TextDocumentHover
328328
hover ide _ msgParam = do
329329
nfp <- getNormalizedFilePathE uri
330330
(cabalFields, _) <- runActionE "cabal.cabal-hover" ide $ useWithStaleE ParseCabalFields nfp
331-
let mCursorText = CabalFields.findTextWord cursor cabalFields
332-
case mCursorText of
331+
case CabalFields.findTextWord cursor cabalFields of
333332
Nothing ->
334333
pure $ InR Null
335334
Just cursorText -> do
336335
(gpd, _) <- runActionE "cabal.GPD" ide $ useWithStaleE ParseCabalFile nfp
337336
let depsNames = map dependencyName $ allBuildDepends $ flattenPackageDescription gpd
338-
mText = filterVersion cursorText
339-
case mText of
337+
case filterVersion cursorText of
340338
Nothing -> pure $ InR Null
341339
Just txt ->
342340
if txt `elem` depsNames

0 commit comments

Comments
 (0)