Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/fsharp/vs/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,18 @@ type TypeCheckInfo
Trace.TraceInformation(sprintf "FCS: recovering from error in IsRelativeNameResolvable: '%s'" msg)
false)

/// Determines if a long ident is resolvable at a specific point.
member __.IsRelativeNameResolvable(cursorPos: pos, plid: string list, symbolUse: FSharpSymbolUse) : bool =
ErrorScope.Protect
Range.range0
(fun () ->
/// Find items in the best naming environment.
let (nenv, ad), m = GetBestEnvForPos cursorPos
NameResolution.IsItemResolvable ncenv nenv m ad plid symbolUse.Symbol.Item)
(fun msg ->
Trace.TraceInformation(sprintf "FCS: recovering from error in IsRelativeNameResolvable: '%s'" msg)
false)

/// Get the auto-complete items at a location
member __.GetDeclarations (ctok, parseResultsOpt, line, lineStr, colAtEndOfNamesAndResidue, qualifyingNames, partialName, getAllSymbols, hasTextChangedSinceLastTypecheck) =
let isInterfaceFile = SourceFileImpl.IsInterfaceFile mainInputFileName
Expand Down
4 changes: 4 additions & 0 deletions src/fsharp/vs/service.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ type internal FSharpCheckFileResults =
/// <param name="userOpName">An optional string used for tracing compiler operations associated with this request.</param>
member internal IsRelativeNameResolvable: cursorPos : pos * plid : string list * item: Item * ?userOpName: string -> Async<bool>

/// Determines if a long ident is resolvable at a specific point.
/// <param name="userOpName">An optional string used for tracing compiler operations associated with this request.</param>
member IsRelativeNameResolvable: cursorPos : pos * plid : string list * symbolUse: FSharpSymbolUse * ?userOpName: string -> Async<bool>

/// Represents complete typechecked implementation files, including thier typechecked signatures if any.
member ImplementationFiles: FSharpImplementationFileContents list option

Expand Down