File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
vsintegration/src/FSharp.Editor/Hints Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ module HintService =
1313 // Relatively convenient for testing
1414 type NativeHint = {
1515 Range: range
16- Parts: seq < TaggedText >
16+ Parts: TaggedText list
1717 }
1818
1919 let private isValidForHint
@@ -43,36 +43,37 @@ module HintService =
4343 match symbol.GetReturnTypeLayout symbolUse.DisplayContext with
4444 | Some typeInfo ->
4545 let colon = TaggedText( TextTag.Text, " : " )
46- Seq.append ( seq { colon }) typeInfo
46+ colon :: ( typeInfo |> Array.toList )
4747
4848 // not sure when this can happen but better safe than sorry
4949 | None ->
50- Seq.empty
50+ []
5151
5252 let private getHintsForSymbol parseResults ( symbolUse : FSharpSymbolUse ) =
5353 match symbolUse.Symbol with
5454 | :? FSharpMemberOrFunctionOrValue as mfvSymbol
5555 when isValidForHint parseResults mfvSymbol symbolUse ->
5656
57- seq { {
57+ [ {
5858 Range = symbolUse.Range
5959 Parts = getHintParts mfvSymbol symbolUse
60- } }
60+ } ]
6161
6262 // we'll be adding other stuff gradually here
6363 | _ ->
64- Seq.empty
64+ []
6565
6666 let getHintsForDocument ( document : Document ) userOpName cancellationToken =
6767 task {
6868 if isSignatureFile document.FilePath
6969 then
70- return Seq.empty
70+ return []
7171 else
7272 let! parseResults , checkResults =
7373 document.GetFSharpParseAndCheckResultsAsync userOpName
7474
7575 return
7676 checkResults.GetAllUsesOfAllSymbolsInFile cancellationToken
77- |> Seq.collect ( getHintsForSymbol parseResults)
77+ |> Seq.toList
78+ |> List.collect ( getHintsForSymbol parseResults)
7879 }
You can’t perform that action at this time.
0 commit comments