Skip to content

Commit

Permalink
Added missing directives (dotnet#13431)
Browse files Browse the repository at this point in the history
* Added missing directives

* More missing directives

* More missing directives
  • Loading branch information
ncave authored Jul 3, 2022
1 parent 2665f36 commit 4e29955
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compiler/Checking/AttributeChecking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
#if !NO_TYPEPROVIDERS
(fun provAttribs -> Some (CheckProvidedAttributes g m provAttribs))
#else
(fun _provAttribs -> None)
(fun _provAttribs -> None)
#endif
match search with
| Some res -> res
Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8534,8 +8534,10 @@ and TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem after
TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic delayed

and TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed =
#if !NO_TYPEPROVIDERS
let g = cenv.g
let ad = env.eAccessRights
#endif
let objTy =
match minfos with
| minfo :: _ -> minfo.ApparentEnclosingType
Expand Down
28 changes: 28 additions & 0 deletions src/Compiler/TypedTree/TypedTree.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ type Entity =
/// Indicates the type prefers the "tycon<a, b>" syntax for display etc.
member IsPrefixDisplay: bool

#if !NO_TYPEPROVIDERS
/// Indicates if the entity is a provided type or namespace definition
member IsProvided: bool

Expand All @@ -661,11 +662,14 @@ type Entity =

/// Indicates if the entity is a provided namespace fragment
member IsProvidedNamespace: bool
#endif

/// Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition.
member IsRecordTycon: bool

#if !NO_TYPEPROVIDERS
member IsStaticInstantiationTycon: bool
#endif

/// Indicates if this is a struct or enum type definition, i.e. a value type definition
member IsStructOrEnumTycon: bool
Expand Down Expand Up @@ -881,13 +885,15 @@ type TyconRepresentation =
/// Indicates the type is parameterized on a measure (e.g. float<_>) but erases to some other type (e.g. float)
| TMeasureableRepr of TType

#if !NO_TYPEPROVIDERS
/// TProvidedTypeRepr
///
/// Indicates the representation information for a provided type.
| TProvidedTypeRepr of TProvidedTypeInfo

/// Indicates the representation information for a provided namespace.
| TProvidedNamespaceRepr of ResolutionEnvironment * Tainted<ITypeProvider> list
#endif

/// The 'NoRepr' value here has four meanings:
/// (1) it indicates 'not yet known' during the first 2 phases of establishing type definitions
Expand All @@ -910,6 +916,8 @@ type TILObjectReprData =
[<DebuggerBrowsable(DebuggerBrowsableState.Never)>]
member DebugText: string

#if !NO_TYPEPROVIDERS

/// The information kept about a provided type
[<NoComparison; NoEquality; RequireQualifiedAccess; StructuredFormatDisplay("{DebugText}")>]
type TProvidedTypeInfo =
Expand Down Expand Up @@ -971,6 +979,8 @@ type TProvidedTypeInfo =
/// Indicates if the provided type is generated, i.e. not erased
member IsGenerated: bool

#endif

type TyconFSharpObjModelKind =

/// Indicates the type is an F#-declared class (also used for units-of-measure)
Expand Down Expand Up @@ -1308,8 +1318,10 @@ type ModuleOrNamespaceType =
/// Mutation used during compilation of FSharp.Core.dll
member AddModuleOrNamespaceByMutation: modul: ModuleOrNamespace -> unit

#if !NO_TYPEPROVIDERS
/// Mutation used in hosting scenarios to hold the hosted types in this module or namespace
member AddProvidedTypeEntity: entity: Entity -> unit
#endif

/// Return a new module or namespace type with a value added.
member AddVal: vspec: Val -> ModuleOrNamespaceType
Expand Down Expand Up @@ -2192,9 +2204,11 @@ type NonLocalEntityRef =
/// Try to find the entity corresponding to the given path in the given CCU
static member TryDerefEntityPath: ccu: CcuThunk * path: string[] * i: int * entity: Entity -> Entity voption

#if !NO_TYPEPROVIDERS
/// Try to find the entity corresponding to the given path, using type-providers to link the data
static member TryDerefEntityPathViaProvidedType:
ccu: CcuThunk * path: string[] * i: int * entity: Entity -> Entity voption
#endif

override ToString: unit -> string

Expand Down Expand Up @@ -2446,6 +2460,7 @@ type EntityRef =
/// Indicates the type prefers the "tycon<a, b>" syntax for display etc.
member IsPrefixDisplay: bool

#if !NO_TYPEPROVIDERS
/// Indicates if the entity is a provided namespace fragment
member IsProvided: bool

Expand All @@ -2457,15 +2472,18 @@ type EntityRef =

/// Indicates if the entity is a provided namespace fragment
member IsProvidedNamespace: bool
#endif

/// Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition.
member IsRecordTycon: bool

/// Indicates if the reference has been resolved
member IsResolved: bool

#if !NO_TYPEPROVIDERS
/// Indicates if the entity is an erased provided type definition that incorporates a static instantiation (type therefore in some sense compiler generated)
member IsStaticInstantiationTycon: bool
#endif

/// Indicates if this is a struct or enum type definition, i.e. a value type definition
member IsStructOrEnumTycon: bool
Expand Down Expand Up @@ -3867,6 +3885,7 @@ type CcuData =
/// Indicates that this DLL was compiled using the F# compiler type has F# metadata
IsFSharp: bool
#if !NO_TYPEPROVIDERS
/// Is the CCu an assembly injected by a type provider
IsProviderGenerated: bool
Expand All @@ -3876,6 +3895,7 @@ type CcuData =
/// A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality
/// logic in tastops.fs
ImportProvidedType: Tainted<ProvidedType> -> TType
#endif
/// Indicates that this DLL uses pre-F#-4.0 quotation literals somewhere. This is used to implement a restriction on static linking
mutable UsesFSharp20PlusQuotations: bool
Expand Down Expand Up @@ -3944,8 +3964,10 @@ type CcuThunk =
/// Fixup a CCU to have the given contents
member Fixup: avail: CcuThunk -> unit
#if !NO_TYPEPROVIDERS
/// Used to make 'forward' calls into the loader during linking
member ImportProvidedType: ty: Tainted<ProvidedType> -> TType
#endif
/// Used to make forward calls into the type/assembly loader when comparing member signatures during linking
member MemberSignatureEquality: ty1: TType * ty2: TType -> bool
Expand Down Expand Up @@ -3980,8 +4002,10 @@ type CcuThunk =
/// Indicates that this DLL was compiled using the F# compiler type has F# metadata
member IsFSharp: bool
#if !NO_TYPEPROVIDERS
/// Is this a provider-injected assembly
member IsProviderGenerated: bool
#endif
/// Indicates if this assembly reference is unresolved
member IsUnresolvedReference: bool
Expand Down Expand Up @@ -4120,9 +4144,11 @@ type Construct =
new: unit -> Construct
#if !NO_TYPEPROVIDERS
/// Compute the definition location of a provided item
static member ComputeDefinitionLocationOfProvidedItem:
p: Tainted<#IProvidedCustomAttributeProvider> -> Text.range option
#endif
/// Key a Tycon or TyconRef by both mangled type demangled name.
/// Generic types can be accessed either by 'List' or 'List`1'.
Expand Down Expand Up @@ -4207,6 +4233,7 @@ type Construct =
static member NewModuleOrNamespaceType:
mkind: ModuleOrNamespaceKind -> tycons: Entity list -> vals: Val list -> ModuleOrNamespaceType
#if !NO_TYPEPROVIDERS
/// Create a new entity node for a provided type definition
static member NewProvidedTycon:
resolutionEnvironment: ResolutionEnvironment *
Expand All @@ -4226,6 +4253,7 @@ type Construct =
isSuppressRelocate: bool *
m: Text.range ->
TyconRepresentation
#endif
/// Create a new TAST RecdField node for an F# class, struct or record field
static member NewRecdField:
Expand Down

0 comments on commit 4e29955

Please sign in to comment.