Skip to content

Commit 4e29955

Browse files
authored
Added missing directives (#13431)
* Added missing directives * More missing directives * More missing directives
1 parent 2665f36 commit 4e29955

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

src/Compiler/Checking/AttributeChecking.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ let CheckMethInfoAttributes g m tyargsOpt (minfo: MethInfo) =
415415
#if !NO_TYPEPROVIDERS
416416
(fun provAttribs -> Some (CheckProvidedAttributes g m provAttribs))
417417
#else
418-
(fun _provAttribs -> None)
418+
(fun _provAttribs -> None)
419419
#endif
420420
match search with
421421
| Some res -> res

src/Compiler/Checking/CheckExpressions.fs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8534,8 +8534,10 @@ and TcMethodItemThen cenv overallTy env item methodName minfos tpenv mItem after
85348534
TcMethodApplicationThen cenv env overallTy None tpenv None [] mItem mItem methodName ad NeverMutates false meths afterResolution NormalValUse [] ExprAtomicFlag.Atomic delayed
85358535

85368536
and TcCtorItemThen cenv overallTy env item nm minfos tinstEnclosing tpenv mItem afterResolution delayed =
8537+
#if !NO_TYPEPROVIDERS
85378538
let g = cenv.g
85388539
let ad = env.eAccessRights
8540+
#endif
85398541
let objTy =
85408542
match minfos with
85418543
| minfo :: _ -> minfo.ApparentEnclosingType

src/Compiler/TypedTree/TypedTree.fsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ type Entity =
650650
/// Indicates the type prefers the "tycon<a, b>" syntax for display etc.
651651
member IsPrefixDisplay: bool
652652

653+
#if !NO_TYPEPROVIDERS
653654
/// Indicates if the entity is a provided type or namespace definition
654655
member IsProvided: bool
655656

@@ -661,11 +662,14 @@ type Entity =
661662

662663
/// Indicates if the entity is a provided namespace fragment
663664
member IsProvidedNamespace: bool
665+
#endif
664666

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

670+
#if !NO_TYPEPROVIDERS
668671
member IsStaticInstantiationTycon: bool
672+
#endif
669673

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

888+
#if !NO_TYPEPROVIDERS
884889
/// TProvidedTypeRepr
885890
///
886891
/// Indicates the representation information for a provided type.
887892
| TProvidedTypeRepr of TProvidedTypeInfo
888893

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

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

919+
#if !NO_TYPEPROVIDERS
920+
913921
/// The information kept about a provided type
914922
[<NoComparison; NoEquality; RequireQualifiedAccess; StructuredFormatDisplay("{DebugText}")>]
915923
type TProvidedTypeInfo =
@@ -971,6 +979,8 @@ type TProvidedTypeInfo =
971979
/// Indicates if the provided type is generated, i.e. not erased
972980
member IsGenerated: bool
973981

982+
#endif
983+
974984
type TyconFSharpObjModelKind =
975985

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

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

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

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

21992213
override ToString: unit -> string
22002214

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

2463+
#if !NO_TYPEPROVIDERS
24492464
/// Indicates if the entity is a provided namespace fragment
24502465
member IsProvided: bool
24512466

@@ -2457,15 +2472,18 @@ type EntityRef =
24572472

24582473
/// Indicates if the entity is a provided namespace fragment
24592474
member IsProvidedNamespace: bool
2475+
#endif
24602476

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

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

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

24702488
/// Indicates if this is a struct or enum type definition, i.e. a value type definition
24712489
member IsStructOrEnumTycon: bool
@@ -3867,6 +3885,7 @@ type CcuData =
38673885
/// Indicates that this DLL was compiled using the F# compiler type has F# metadata
38683886
IsFSharp: bool
38693887
3888+
#if !NO_TYPEPROVIDERS
38703889
/// Is the CCu an assembly injected by a type provider
38713890
IsProviderGenerated: bool
38723891
@@ -3876,6 +3895,7 @@ type CcuData =
38763895
/// A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality
38773896
/// logic in tastops.fs
38783897
ImportProvidedType: Tainted<ProvidedType> -> TType
3898+
#endif
38793899
38803900
/// Indicates that this DLL uses pre-F#-4.0 quotation literals somewhere. This is used to implement a restriction on static linking
38813901
mutable UsesFSharp20PlusQuotations: bool
@@ -3944,8 +3964,10 @@ type CcuThunk =
39443964
/// Fixup a CCU to have the given contents
39453965
member Fixup: avail: CcuThunk -> unit
39463966
3967+
#if !NO_TYPEPROVIDERS
39473968
/// Used to make 'forward' calls into the loader during linking
39483969
member ImportProvidedType: ty: Tainted<ProvidedType> -> TType
3970+
#endif
39493971
39503972
/// Used to make forward calls into the type/assembly loader when comparing member signatures during linking
39513973
member MemberSignatureEquality: ty1: TType * ty2: TType -> bool
@@ -3980,8 +4002,10 @@ type CcuThunk =
39804002
/// Indicates that this DLL was compiled using the F# compiler type has F# metadata
39814003
member IsFSharp: bool
39824004
4005+
#if !NO_TYPEPROVIDERS
39834006
/// Is this a provider-injected assembly
39844007
member IsProviderGenerated: bool
4008+
#endif
39854009
39864010
/// Indicates if this assembly reference is unresolved
39874011
member IsUnresolvedReference: bool
@@ -4120,9 +4144,11 @@ type Construct =
41204144
41214145
new: unit -> Construct
41224146
4147+
#if !NO_TYPEPROVIDERS
41234148
/// Compute the definition location of a provided item
41244149
static member ComputeDefinitionLocationOfProvidedItem:
41254150
p: Tainted<#IProvidedCustomAttributeProvider> -> Text.range option
4151+
#endif
41264152
41274153
/// Key a Tycon or TyconRef by both mangled type demangled name.
41284154
/// Generic types can be accessed either by 'List' or 'List`1'.
@@ -4207,6 +4233,7 @@ type Construct =
42074233
static member NewModuleOrNamespaceType:
42084234
mkind: ModuleOrNamespaceKind -> tycons: Entity list -> vals: Val list -> ModuleOrNamespaceType
42094235
4236+
#if !NO_TYPEPROVIDERS
42104237
/// Create a new entity node for a provided type definition
42114238
static member NewProvidedTycon:
42124239
resolutionEnvironment: ResolutionEnvironment *
@@ -4226,6 +4253,7 @@ type Construct =
42264253
isSuppressRelocate: bool *
42274254
m: Text.range ->
42284255
TyconRepresentation
4256+
#endif
42294257
42304258
/// Create a new TAST RecdField node for an F# class, struct or record field
42314259
static member NewRecdField:

0 commit comments

Comments
 (0)