Skip to content
Merged
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
10 changes: 10 additions & 0 deletions src/fsharp/vs/service.fs
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,10 @@ type TypeCheckInfo
(fun msg ->
Trace.TraceInformation(sprintf "FCS: recovering from error in IsRelativeNameResolvable: '%s'" msg)
false)

/// Determines if a long ident is resolvable at a specific point.
member scope.IsRelativeNameResolvableFromSymbol(cursorPos: pos, plid: string list, symbol: FSharpSymbol) : bool =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the prettiest name but it will do :)

scope.IsRelativeNameResolvable(cursorPos, plid, symbol.Item)

/// Get the auto-complete items at a location
member __.GetDeclarations (ctok, parseResultsOpt, line, lineStr, colAtEndOfNamesAndResidue, qualifyingNames, partialName, getAllSymbols, hasTextChangedSinceLastTypecheck) =
Expand Down Expand Up @@ -2012,6 +2016,12 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp
reactorOp userOpName "IsRelativeNameResolvable" true (fun ctok scope ->
RequireCompilationThread ctok
scope.IsRelativeNameResolvable(pos, plid, item))

member info.IsRelativeNameResolvableFromSymbol(pos: pos, plid: string list, symbol: FSharpSymbol, ?userOpName: string) =
let userOpName = defaultArg userOpName "Unknown"
reactorOp userOpName "IsRelativeNameResolvableFromSymbol" true (fun ctok scope ->
RequireCompilationThread ctok
scope.IsRelativeNameResolvableFromSymbol(pos, plid, symbol))

member info.ImplementationFiles =
if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies"
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 IsRelativeNameResolvableFromSymbol: cursorPos : pos * plid : string list * symbol: FSharpSymbol * ?userOpName: string -> Async<bool>

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

Expand Down