Skip to content
Merged
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
29 changes: 16 additions & 13 deletions src/fsharp/symbols/SymbolHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -839,19 +839,22 @@ module internal SymbolHelpers =
// This may explore assemblies that are not in the reference set.
// In this case just assume the item is not suppressed.
protectAssemblyExploration true (fun () ->
match item with
| Item.Types(it, [ty]) ->
isAppTy g ty &&
g.suppressed_types
|> List.exists (fun supp ->
let generalizedSupp = generalizedTyconRef supp
// check the display name is precisely the one we're suppressing
isAppTy g generalizedSupp && it = supp.DisplayName &&
// check if they are the same logical type (after removing all abbreviations)
let tcr1 = tcrefOfAppTy g ty
let tcr2 = tcrefOfAppTy g generalizedSupp
tyconRefEq g tcr1 tcr2)
| _ -> false)
match item with
| Item.Types(it, [ty]) ->
match tryDestAppTy g ty with
| ValueSome tcr1 ->
g.suppressed_types
|> List.exists (fun supp ->
let generalizedSupp = generalizedTyconRef supp
// check the display name is precisely the one we're suppressing
match tryDestAppTy g generalizedSupp with
| ValueSome tcr2 ->
it = supp.DisplayName &&
// check if they are the same logical type (after removing all abbreviations)
tyconRefEq g tcr1 tcr2
| _ -> false)
| _ -> false
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: ValueNone should probably be preferred. Even though _ is used a lot in this codebase I think it's best if we only add new _ if we have 2 or more cases we don't care about

| _ -> false)

/// Filter types that are explicitly suppressed from the IntelliSense (such as uppercase "FSharpList", "Option", etc.)
let RemoveExplicitlySuppressed (g: TcGlobals) (items: ItemWithInst list) =
Expand Down