Skip to content

Commit f5a9858

Browse files
committed
Remove outdated TODO items
1 parent 195db18 commit f5a9858

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

haskell-language-server.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,6 @@ common signatureHelp
848848
build-depends: haskell-language-server:hls-signature-help-plugin
849849
cpp-options: -Dhls_signatureHelp
850850

851-
-- TODO(@linj) remove unneeded deps
852851
library hls-signature-help-plugin
853852
import: defaults, pedantic, warnings
854853
if !flag(signatureHelp)

hls-plugin-api/src/Ide/Types.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,6 @@ instance PluginRequestMethod Method_TextDocumentDocumentSymbol where
770770
si = SymbolInformation name' (ds ^. L.kind) Nothing parent (ds ^. L.deprecated) loc
771771
in [si] <> children'
772772

773-
-- TODO(@linj) is this correct?
774773
instance PluginRequestMethod Method_TextDocumentSignatureHelp where
775774
combineResponses _ _ _ _ (x :| _) = x
776775

plugins/hls-signature-help-plugin/src/Ide/Plugin/SignatureHelp.hs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ import Language.LSP.Protocol.Types (MarkupContent (MarkupCont
7272
UInt,
7373
type (|?) (InL, InR))
7474

75-
data Log = LogDummy
75+
data Log
7676

7777
instance Pretty Log where
7878
pretty = \case
79-
LogDummy -> "TODO(@linj) remove this dummy log"
8079

8180
descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeState
8281
descriptor _recorder pluginId =
@@ -88,7 +87,6 @@ signatureHelpProvider :: PluginMethodHandler IdeState Method_TextDocumentSignatu
8887
signatureHelpProvider ideState _pluginId (SignatureHelpParams (TextDocumentIdentifier uri) position _mProgreeToken mSignatureHelpContext) = do
8988
nfp <- getNormalizedFilePathE uri
9089
results <- runIdeActionE "signatureHelp.ast" (shakeExtras ideState) $ do
91-
-- TODO(@linj) why HAR {hieAst} may have more than one AST?
9290
(HAR {hieAst, hieKind}, positionMapping) <- useWithStaleFastE GetHieAst nfp
9391
case fromCurrentPosition positionMapping position of
9492
Nothing -> pure []
@@ -112,7 +110,6 @@ signatureHelpProvider ideState _pluginId (SignatureHelpParams (TextDocumentIdent
112110
[(_functionName, [], _argumentNumber)] -> pure $ InR Null
113111
[(functionName, functionTypes, argumentNumber)] ->
114112
pure $ InL $ mkSignatureHelp mSignatureHelpContext docMap argDocMap (fromIntegral argumentNumber - 1) functionName functionTypes
115-
-- TODO(@linj) what does non-singleton list mean?
116113
_ -> pure $ InR Null
117114

118115
mkSignatureHelp :: Maybe SignatureHelpContext -> DocMap -> ArgDocMap -> UInt -> Name -> [Type] -> SignatureHelp
@@ -250,7 +247,6 @@ nodeHasAnnotation annotation hieAst = case sourceNodeInfo hieAst of
250247
Nothing -> False
251248
Just nodeInfo -> isAnnotationInNodeInfo annotation nodeInfo
252249

253-
-- TODO(@linj): the left most node may not be the function node. example: (if True then f else g) x
254250
getLeftMostNode :: HieAST a -> HieAST a
255251
getLeftMostNode thisNode =
256252
case nodeChildren thisNode of
@@ -275,7 +271,7 @@ getNodeNameAndTypes hieKind hieAst =
275271
in Just (name, filterCoreTypes allTypes)
276272
[] -> Nothing
277273
_ -> Nothing -- seems impossible
278-
else Nothing -- TODO(@linj) must function node be HsVar?
274+
else Nothing
279275
where
280276
extractName = rightToMaybe
281277

@@ -291,7 +287,6 @@ getNodeNameAndTypes hieKind hieAst =
291287
isUse :: IdentifierDetails a -> Bool
292288
isUse = identInfo >>> S.member Use
293289

294-
-- TODO(@linj) handle more cases
295290
-- Just 1 means the first argument
296291
getArgumentNumber :: RealSrcSpan -> HieAST a -> Maybe Integer
297292
getArgumentNumber span hieAst

plugins/hls-signature-help-plugin/test/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ instance (IsSimilar a, IsSimilar b) => IsSimilar (a |? b) where
502502
InR x ~= InR y = x ~= y
503503
_ ~= _ = False
504504

505-
-- TODO(@linj) use the one from lsp-test when we have https://github.com/haskell/lsp/pull/621
505+
-- TODO use the one from lsp-test when we have https://github.com/haskell/lsp/pull/621
506506
-- | Returns the signature help at the specified position.
507507
getSignatureHelp :: TextDocumentIdentifier -> Position -> Session (Maybe SignatureHelp)
508508
getSignatureHelp doc pos =

0 commit comments

Comments
 (0)