forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompileOps.fsi
More file actions
executable file
·799 lines (670 loc) · 33.9 KB
/
Copy pathCompileOps.fsi
File metadata and controls
executable file
·799 lines (670 loc) · 33.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
/// Coordinating compiler operations - configuration, loading initial context, reporting errors etc.
module internal Microsoft.FSharp.Compiler.CompileOps
open System
open System.Text
open System.Collections.Generic
open Internal.Utilities
open Microsoft.FSharp.Compiler.AbstractIL
open Microsoft.FSharp.Compiler.AbstractIL.IL
open Microsoft.FSharp.Compiler.AbstractIL.Internal
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
open Microsoft.FSharp.Compiler
open Microsoft.FSharp.Compiler.TypeChecker
open Microsoft.FSharp.Compiler.Range
open Microsoft.FSharp.Compiler.Ast
open Microsoft.FSharp.Compiler.ErrorLogger
open Microsoft.FSharp.Compiler.Tast
open Microsoft.FSharp.Compiler.Tastops
open Microsoft.FSharp.Compiler.Lib
open Microsoft.FSharp.Compiler.Infos
open Microsoft.FSharp.Compiler.ReferenceResolver
open Microsoft.FSharp.Compiler.TcGlobals
open Microsoft.FSharp.Core.CompilerServices
#if EXTENSIONTYPING
open Microsoft.FSharp.Compiler.ExtensionTyping
#endif
#if DEBUG
#if COMPILED_AS_LANGUAGE_SERVICE_DLL
module internal CompilerService =
#else
module internal FullCompiler =
#endif
val showAssertForUnexpectedException : bool ref
#endif
//----------------------------------------------------------------------------
// File names and known file suffixes
//--------------------------------------------------------------------------
/// Signature file suffixes
val FSharpSigFileSuffixes : string list
/// Implementation file suffixes
val FSharpImplFileSuffixes : string list
/// Script file suffixes
val FSharpScriptFileSuffixes : string list
val IsScript : string -> bool
/// File suffixes where #light is the default
val FSharpLightSyntaxFileSuffixes : string list
/// Get the name used for FSharp.Core
val GetFSharpCoreLibraryName : unit -> string
//----------------------------------------------------------------------------
// Parsing inputs
//--------------------------------------------------------------------------
val ComputeQualifiedNameOfFileFromUniquePath : range * string list -> Ast.QualifiedNameOfFile
val PrependPathToInput : Ast.Ident list -> Ast.ParsedInput -> Ast.ParsedInput
val ParseInput : (UnicodeLexing.Lexbuf -> Parser.token) * ErrorLogger * UnicodeLexing.Lexbuf * string option * string * isLastCompiland:(bool * bool) -> Ast.ParsedInput
//----------------------------------------------------------------------------
// Error and warnings
//--------------------------------------------------------------------------
/// Get the location associated with an error
val GetRangeOfDiagnostic : PhasedDiagnostic -> range option
/// Get the number associated with an error
val GetDiagnosticNumber : PhasedDiagnostic -> int
/// Split errors into a "main" error and a set of associated errors
val SplitRelatedDiagnostics : PhasedDiagnostic -> PhasedDiagnostic * PhasedDiagnostic list
/// Output an error to a buffer
val OutputPhasedDiagnostic : ErrorStyle -> StringBuilder -> PhasedDiagnostic -> isError: bool -> unit
/// Output an error or warning to a buffer
val OutputDiagnostic : implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * isError:bool -> StringBuilder -> PhasedDiagnostic -> unit
/// Output extra context information for an error or warning to a buffer
val OutputDiagnosticContext : prefix:string -> fileLineFunction:(string -> int -> string) -> StringBuilder -> PhasedDiagnostic -> unit
/// Part of LegacyHostedCompilerForTesting
[<RequireQualifiedAccess>]
type DiagnosticLocation =
{ Range : range
File : string
TextRepresentation : string
IsEmpty : bool }
/// Part of LegacyHostedCompilerForTesting
[<RequireQualifiedAccess>]
type DiagnosticCanonicalInformation =
{ ErrorNumber : int
Subcategory : string
TextRepresentation : string }
/// Part of LegacyHostedCompilerForTesting
[<RequireQualifiedAccess>]
type DiagnosticDetailedInfo =
{ Location : DiagnosticLocation option
Canonical : DiagnosticCanonicalInformation
Message : string }
/// Part of LegacyHostedCompilerForTesting
[<RequireQualifiedAccess>]
type Diagnostic =
| Short of bool * string
| Long of bool * DiagnosticDetailedInfo
/// Part of LegacyHostedCompilerForTesting
val CollectDiagnostic : implicitIncludeDir:string * showFullPaths: bool * flattenErrors: bool * errorStyle: ErrorStyle * warning:bool * PhasedDiagnostic -> seq<Diagnostic>
//----------------------------------------------------------------------------
// Resolve assembly references
//--------------------------------------------------------------------------
exception AssemblyNotResolved of (*originalName*) string * range
exception FileNameNotResolved of (*filename*) string * (*description of searched locations*) string * range
exception DeprecatedCommandLineOptionFull of string * range
exception DeprecatedCommandLineOptionForHtmlDoc of string * range
exception DeprecatedCommandLineOptionSuggestAlternative of string * string * range
exception DeprecatedCommandLineOptionNoDescription of string * range
exception InternalCommandLineOption of string * range
exception HashLoadedSourceHasIssues of (*warnings*) exn list * (*errors*) exn list * range
exception HashLoadedScriptConsideredSource of range
//----------------------------------------------------------------------------
/// Represents a reference to an F# assembly. May be backed by a real assembly on disk (read by Abstract IL), or a cross-project
/// reference in FSharp.Compiler.Service.
type IRawFSharpAssemblyData =
/// The raw list AutoOpenAttribute attributes in the assembly
abstract GetAutoOpenAttributes : ILGlobals -> string list
/// The raw list InternalsVisibleToAttribute attributes in the assembly
abstract GetInternalsVisibleToAttributes : ILGlobals -> string list
/// The raw IL module definition in the assembly, if any. This is not present for cross-project references
/// in the language service
abstract TryGetRawILModule : unit -> ILModuleDef option
abstract HasAnyFSharpSignatureDataAttribute : bool
abstract HasMatchingFSharpSignatureDataAttribute : ILGlobals -> bool
/// The raw F# signature data in the assembly, if any
abstract GetRawFSharpSignatureData : range * ilShortAssemName: string * fileName: string -> (string * byte[]) list
/// The raw F# optimization data in the assembly, if any
abstract GetRawFSharpOptimizationData : range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list
/// The table of type forwarders in the assembly
abstract GetRawTypeForwarders : unit -> ILExportedTypesAndForwarders
/// The identity of the module
abstract ILScopeRef : ILScopeRef
abstract ILAssemblyRefs : ILAssemblyRef list
abstract ShortAssemblyName : string
type TimeStampCache =
new : defaultTimeStamp: DateTime -> TimeStampCache
member GetFileTimeStamp: string -> DateTime
member GetProjectReferenceTimeStamp: IProjectReference * CompilationThreadToken -> DateTime
and IProjectReference =
/// The name of the assembly file generated by the project
abstract FileName : string
/// Evaluate raw contents of the assembly file generated by the project
abstract EvaluateRawContents : CompilationThreadToken -> Cancellable<IRawFSharpAssemblyData option>
/// Get the logical timestamp that would be the timestamp of the assembly file generated by the project.
///
/// For project references this is maximum of the timestamps of all dependent files.
/// The project is not actually built, nor are any assemblies read, but the timestamps for each dependent file
/// are read via the FileSystem. If the files don't exist, then a default timestamp is used.
///
/// The operation returns None only if it is not possible to create an IncrementalBuilder for the project at all, e.g. if there
/// are fatal errors in the options for the project.
abstract TryGetLogicalTimeStamp : TimeStampCache * CompilationThreadToken -> System.DateTime option
type AssemblyReference =
| AssemblyReference of range * string * IProjectReference option
member Range : range
member Text : string
member ProjectReference : IProjectReference option
type AssemblyResolution =
{/// The original reference to the assembly.
originalReference : AssemblyReference
/// Path to the resolvedFile
resolvedPath : string
/// Create the tooltip texxt for the assembly reference
prepareToolTip : unit -> string
/// Whether or not this is an installed system assembly (for example, System.dll)
sysdir : bool
// Lazily populated ilAssemblyRef for this reference.
ilAssemblyRef : ILAssemblyRef option ref }
type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list
#if EXTENSIONTYPING
type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted<ITypeProvider> list
#endif
type CompilerTarget =
| WinExe
| ConsoleExe
| Dll
| Module
member IsExe : bool
type ResolveAssemblyReferenceMode =
| Speculative
| ReportErrors
//----------------------------------------------------------------------------
// TcConfig
//--------------------------------------------------------------------------
/// Represents the file or string used for the --version flag
type VersionFlag =
| VersionString of string
| VersionFile of string
| VersionNone
member GetVersionInfo : implicitIncludeDir:string -> ILVersionInfo
member GetVersionString : implicitIncludeDir:string -> string
type TcConfigBuilder =
{ mutable primaryAssembly : PrimaryAssembly
mutable autoResolveOpenDirectivesToDlls: bool
mutable noFeedback: bool
mutable stackReserveSize: int32 option
mutable implicitIncludeDir: string
mutable openBinariesInMemory: bool
mutable openDebugInformationForLaterStaticLinking: bool
defaultFSharpBinariesDir: string
mutable compilingFslib: bool
mutable compilingFslib20: string option
mutable compilingFslib40: bool
mutable compilingFslibNoBigInt: bool
mutable useIncrementalBuilder: bool
mutable includes: string list
mutable implicitOpens: string list
mutable useFsiAuxLib: bool
mutable framework: bool
mutable resolutionEnvironment : ReferenceResolver.ResolutionEnvironment
mutable implicitlyResolveAssemblies : bool
/// Set if the user has explicitly turned indentation-aware syntax on/off
mutable light: bool option
mutable conditionalCompilationDefines: string list
/// Sources added into the build with #load
mutable loadedSources: (range * string) list
mutable referencedDLLs: AssemblyReference list
mutable projectReferences : IProjectReference list
mutable knownUnresolvedReferences : UnresolvedAssemblyReference list
optimizeForMemory: bool
mutable subsystemVersion : int * int
mutable useHighEntropyVA : bool
mutable inputCodePage: int option
mutable embedResources : string list
mutable globalWarnAsError: bool
mutable globalWarnLevel: int
mutable specificWarnOff: int list
mutable specificWarnOn: int list
mutable specificWarnAsError: int list
mutable specificWarnAsWarn : int list
mutable mlCompatibility:bool
mutable checkOverflow:bool
mutable showReferenceResolutions:bool
mutable outputFile : string option
mutable platform : ILPlatform option
mutable prefer32Bit : bool
mutable useSimpleResolution : bool
mutable target : CompilerTarget
mutable debuginfo : bool
mutable testFlagEmitFeeFeeAs100001 : bool
mutable dumpDebugInfo : bool
mutable debugSymbolFile : string option
mutable typeCheckOnly : bool
mutable parseOnly : bool
mutable importAllReferencesOnly : bool
mutable simulateException : string option
mutable printAst : bool
mutable tokenizeOnly : bool
mutable testInteractionParser : bool
mutable reportNumDecls : bool
mutable printSignature : bool
mutable printSignatureFile : string
mutable xmlDocOutputFile : string option
mutable stats : bool
mutable generateFilterBlocks : bool
mutable signer : string option
mutable container : string option
mutable delaysign : bool
mutable publicsign : bool
mutable version : VersionFlag
mutable metadataVersion : string option
mutable standalone : bool
mutable extraStaticLinkRoots : string list
mutable noSignatureData : bool
mutable onlyEssentialOptimizationData : bool
mutable useOptimizationDataFile : bool
mutable jitTracking : bool
mutable portablePDB : bool
mutable embeddedPDB : bool
mutable embedAllSource : bool
mutable embedSourceList : string list
mutable sourceLink : string
mutable ignoreSymbolStoreSequencePoints : bool
mutable internConstantStrings : bool
mutable extraOptimizationIterations : int
mutable win32res : string
mutable win32manifest : string
mutable includewin32manifest : bool
mutable linkResources : string list
mutable referenceResolver: ReferenceResolver.Resolver
mutable showFullPaths : bool
mutable errorStyle : ErrorStyle
mutable utf8output : bool
mutable flatErrors : bool
mutable maxErrors : int
mutable abortOnError : bool
mutable baseAddress : int32 option
#if DEBUG
mutable showOptimizationData : bool
#endif
mutable showTerms : bool
mutable writeTermsToFiles : bool
mutable doDetuple : bool
mutable doTLR : bool
mutable doFinalSimplify : bool
mutable optsOn : bool
mutable optSettings : Optimizer.OptimizationSettings
mutable emitTailcalls : bool
#if PREFERRED_UI_LANG
mutable preferredUiLang: string option
#endif
mutable lcid : int option
mutable productNameForBannerText : string
mutable showBanner : bool
mutable showTimes : bool
mutable showLoadedAssemblies : bool
mutable continueAfterParseFailure : bool
#if EXTENSIONTYPING
mutable showExtensionTypeMessages : bool
#endif
mutable pause : bool
mutable alwaysCallVirt : bool
mutable noDebugData : bool
/// If true, indicates all type checking and code generation is in the context of fsi.exe
isInteractive : bool
isInvalidationSupported : bool
mutable sqmSessionGuid : System.Guid option
mutable sqmNumOfSourceFiles : int
sqmSessionStartedTime : int64
mutable emitDebugInfoInQuotations : bool
mutable exename : string option
mutable copyFSharpCore : bool
mutable shadowCopyReferences : bool
}
static member CreateNew :
referenceResolver: ReferenceResolver.Resolver *
defaultFSharpBinariesDir: string *
optimizeForMemory: bool *
implicitIncludeDir: string *
isInteractive: bool *
isInvalidationSupported: bool -> TcConfigBuilder
member DecideNames : string list -> outfile: string * pdbfile: string option * assemblyName: string
member TurnWarningOff : range * string -> unit
member TurnWarningOn : range * string -> unit
member AddIncludePath : range * string * string -> unit
member AddReferencedAssemblyByPath : range * string -> unit
member RemoveReferencedAssemblyByPath : range * string -> unit
member AddEmbeddedSourceFile : string -> unit
member AddEmbeddedResource : string -> unit
static member SplitCommandLineResourceInfo : string -> string * string * ILResourceAccess
[<Sealed>]
// Immutable TcConfig
type TcConfig =
member primaryAssembly: PrimaryAssembly
member autoResolveOpenDirectivesToDlls: bool
member noFeedback: bool
member stackReserveSize: int32 option
member implicitIncludeDir: string
member openBinariesInMemory: bool
member openDebugInformationForLaterStaticLinking: bool
member fsharpBinariesDir: string
member compilingFslib: bool
member compilingFslib20: string option
member compilingFslib40: bool
member compilingFslibNoBigInt: bool
member useIncrementalBuilder: bool
member includes: string list
member implicitOpens: string list
member useFsiAuxLib: bool
member framework: bool
member implicitlyResolveAssemblies : bool
/// Set if the user has explicitly turned indentation-aware syntax on/off
member light: bool option
member conditionalCompilationDefines: string list
member subsystemVersion : int * int
member useHighEntropyVA : bool
member referencedDLLs: AssemblyReference list
member optimizeForMemory: bool
member inputCodePage: int option
member embedResources : string list
member globalWarnAsError: bool
member globalWarnLevel: int
member specificWarnOn: int list
member specificWarnOff: int list
member specificWarnAsError: int list
member specificWarnAsWarn : int list
member mlCompatibility:bool
member checkOverflow:bool
member showReferenceResolutions:bool
member outputFile : string option
member platform : ILPlatform option
member prefer32Bit : bool
member useSimpleResolution : bool
member target : CompilerTarget
member debuginfo : bool
member testFlagEmitFeeFeeAs100001 : bool
member dumpDebugInfo : bool
member debugSymbolFile : string option
member typeCheckOnly : bool
member parseOnly : bool
member importAllReferencesOnly : bool
member simulateException : string option
member printAst : bool
member tokenizeOnly : bool
member testInteractionParser : bool
member reportNumDecls : bool
member printSignature : bool
member printSignatureFile : string
member xmlDocOutputFile : string option
member stats : bool
member generateFilterBlocks : bool
member signer : string option
member container : string option
member delaysign : bool
member publicsign : bool
member version : VersionFlag
member metadataVersion : string option
member standalone : bool
member extraStaticLinkRoots : string list
member noSignatureData : bool
member onlyEssentialOptimizationData : bool
member useOptimizationDataFile : bool
member jitTracking : bool
member portablePDB : bool
member embeddedPDB : bool
member embedAllSource : bool
member embedSourceList : string list
member sourceLink : string
member ignoreSymbolStoreSequencePoints : bool
member internConstantStrings : bool
member extraOptimizationIterations : int
member win32res : string
member win32manifest : string
member includewin32manifest : bool
member linkResources : string list
member showFullPaths : bool
member errorStyle : ErrorStyle
member utf8output : bool
member flatErrors : bool
member maxErrors : int
member baseAddress : int32 option
#if DEBUG
member showOptimizationData : bool
#endif
member showTerms : bool
member writeTermsToFiles : bool
member doDetuple : bool
member doTLR : bool
member doFinalSimplify : bool
member optSettings : Optimizer.OptimizationSettings
member emitTailcalls : bool
#if PREFERRED_UI_LANG
member preferredUiLang: string option
#else
member lcid : int option
#endif
member optsOn : bool
member productNameForBannerText : string
member showBanner : bool
member showTimes : bool
member showLoadedAssemblies : bool
member continueAfterParseFailure : bool
#if EXTENSIONTYPING
member showExtensionTypeMessages : bool
#endif
member pause : bool
member alwaysCallVirt : bool
member noDebugData : bool
/// If true, indicates all type checking and code generation is in the context of fsi.exe
member isInteractive : bool
member isInvalidationSupported : bool
member ComputeLightSyntaxInitialStatus : string -> bool
member GetTargetFrameworkDirectories : unit -> string list
/// Get the loaded sources that exist and issue a warning for the ones that don't
member GetAvailableLoadedSources : unit -> (range*string) list
member ComputeCanContainEntryPoint : sourceFiles:string list -> bool list *bool
/// File system query based on TcConfig settings
member ResolveSourceFile : range * filename: string * pathLoadedFrom: string -> string
/// File system query based on TcConfig settings
member MakePathAbsolute : string -> string
member sqmSessionGuid : System.Guid option
member sqmNumOfSourceFiles : int
member sqmSessionStartedTime : int64
member copyFSharpCore : bool
#if FSI_SHADOW_COPY_REFERENCES
member shadowCopyReferences : bool
#endif
static member Create : TcConfigBuilder * validate: bool -> TcConfig
/// Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig,
/// but for F# Interactive it may be based on an underlying mutable TcConfigBuilder.
[<Sealed>]
type TcConfigProvider =
member Get : CompilationThreadToken -> TcConfig
/// Get a TcConfigProvider which will return only the exact TcConfig.
static member Constant : TcConfig -> TcConfigProvider
/// Get a TcConfigProvider which will continue to respect changes in the underlying
/// TcConfigBuilder rather than delivering snapshots.
static member BasedOnMutableBuilder : TcConfigBuilder -> TcConfigProvider
//----------------------------------------------------------------------------
// Tables of referenced DLLs
//--------------------------------------------------------------------------
/// Represents a resolved imported binary
[<RequireQualifiedAccess>]
type ImportedBinary =
{ FileName: string
RawMetadata: IRawFSharpAssemblyData
#if EXTENSIONTYPING
ProviderGeneratedAssembly: System.Reflection.Assembly option
IsProviderGenerated: bool
ProviderGeneratedStaticLinkMap : ProvidedAssemblyStaticLinkingMap option
#endif
ILAssemblyRefs : ILAssemblyRef list
ILScopeRef: ILScopeRef}
/// Represents a resolved imported assembly
[<RequireQualifiedAccess>]
type ImportedAssembly =
{ ILScopeRef: ILScopeRef
FSharpViewOfMetadata: CcuThunk
AssemblyAutoOpenAttributes: string list
AssemblyInternalsVisibleToAttributes: string list
#if EXTENSIONTYPING
IsProviderGenerated: bool
mutable TypeProviders: Tainted<Microsoft.FSharp.Core.CompilerServices.ITypeProvider> list
#endif
FSharpOptimizationData : Lazy<Option<Optimizer.LazyModuleInfo>> }
[<Sealed>]
type TcAssemblyResolutions =
member GetAssemblyResolutions : unit -> AssemblyResolution list
static member SplitNonFoundationalResolutions : CompilationThreadToken * TcConfig -> AssemblyResolution list * AssemblyResolution list * UnresolvedAssemblyReference list
static member BuildFromPriorResolutions : CompilationThreadToken * TcConfig * AssemblyResolution list * UnresolvedAssemblyReference list -> TcAssemblyResolutions
/// Repreesnts a table of imported assemblies with their resolutions.
[<Sealed>]
type TcImports =
interface System.IDisposable
//new : TcImports option -> TcImports
member DllTable : NameMap<ImportedBinary> with get
member GetImportedAssemblies : unit -> ImportedAssembly list
member GetCcusInDeclOrder : unit -> CcuThunk list
/// This excludes any framework imports (which may be shared between multiple builds)
member GetCcusExcludingBase : unit -> CcuThunk list
member FindDllInfo : CompilationThreadToken * range * string -> ImportedBinary
member TryFindDllInfo : CompilationThreadToken * range * string * lookupOnly: bool -> option<ImportedBinary>
member FindCcuFromAssemblyRef : CompilationThreadToken * range * ILAssemblyRef -> CcuResolutionResult
#if EXTENSIONTYPING
member ProviderGeneratedTypeRoots : ProviderGeneratedType list
#endif
member GetImportMap : unit -> Import.ImportMap
/// Try to resolve a referenced assembly based on TcConfig settings.
member TryResolveAssemblyReference : CompilationThreadToken * AssemblyReference * ResolveAssemblyReferenceMode -> OperationResult<AssemblyResolution list>
/// Resolve a referenced assembly and report an error if the resolution fails.
member ResolveAssemblyReference : CompilationThreadToken * AssemblyReference * ResolveAssemblyReferenceMode -> AssemblyResolution list
/// Try to find the given assembly reference.
member TryFindExistingFullyQualifiedPathFromAssemblyRef : CompilationThreadToken * ILAssemblyRef -> string option
#if EXTENSIONTYPING
/// Try to find a provider-generated assembly
member TryFindProviderGeneratedAssemblyByName : CompilationThreadToken * assemblyName:string -> System.Reflection.Assembly option
#endif
/// Report unresolved references that also weren't consumed by any type providers.
member ReportUnresolvedAssemblyReferences : UnresolvedAssemblyReference list -> unit
member SystemRuntimeContainsType : string -> bool
static member BuildFrameworkTcImports : CompilationThreadToken * TcConfigProvider * AssemblyResolution list * AssemblyResolution list -> Cancellable<TcGlobals * TcImports>
static member BuildNonFrameworkTcImports : CompilationThreadToken * TcConfigProvider * TcGlobals * TcImports * AssemblyResolution list * UnresolvedAssemblyReference list -> Cancellable<TcImports>
static member BuildTcImports : CompilationThreadToken * TcConfigProvider -> Cancellable<TcGlobals * TcImports>
//----------------------------------------------------------------------------
// Special resources in DLLs
//--------------------------------------------------------------------------
/// Determine if an IL resource attached to an F# assemnly is an F# signature data resource
val IsSignatureDataResource : ILResource -> bool
/// Determine if an IL resource attached to an F# assemnly is an F# optimization data resource
val IsOptimizationDataResource : ILResource -> bool
/// Determine if an IL resource attached to an F# assemnly is an F# quotation data resource for reflected definitions
val IsReflectedDefinitionsResource : ILResource -> bool
val GetSignatureDataResourceName : ILResource -> string
/// Write F# signature data as an IL resource
val WriteSignatureData : TcConfig * TcGlobals * Tastops.Remap * CcuThunk * string -> ILResource
/// Write F# optimization data as an IL resource
val WriteOptimizationData : TcGlobals * string * CcuThunk * Optimizer.LazyModuleInfo -> ILResource
//----------------------------------------------------------------------------
// #r and other directives
//--------------------------------------------------------------------------
/// Process #r in F# Interactive.
/// Adds the reference to the tcImports and add the ccu to the type checking environment.
val RequireDLL : CompilationThreadToken * TcImports * TcEnv * thisAssemblyName: string * referenceRange: range * file: string -> TcEnv * (ImportedBinary list * ImportedAssembly list)
/// Processing # commands
val ProcessMetaCommandsFromInput :
(('T -> range * string -> 'T) * ('T -> range * string -> 'T) * ('T -> range * string -> unit))
-> TcConfigBuilder * Ast.ParsedInput * string * 'T
-> 'T
/// Process all the #r, #I etc. in an input
val ApplyMetaCommandsFromInputToTcConfig : TcConfig * Ast.ParsedInput * string -> TcConfig
/// Process the #nowarn in an input
val ApplyNoWarnsToTcConfig : TcConfig * Ast.ParsedInput * string -> TcConfig
//----------------------------------------------------------------------------
// Scoped pragmas
//--------------------------------------------------------------------------
/// Find the scoped #nowarn pragmas with their range information
val GetScopedPragmasForInput : Ast.ParsedInput -> ScopedPragma list
/// Get an error logger that filters the reporting of warnings based on scoped pragma information
val GetErrorLoggerFilteringByScopedPragmas : checkFile:bool * ScopedPragma list * ErrorLogger -> ErrorLogger
/// This list is the default set of references for "non-project" files.
val DefaultReferencesForScriptsAndOutOfProjectSources : bool -> string list
//----------------------------------------------------------------------------
// Parsing
//--------------------------------------------------------------------------
/// Parse one input file
val ParseOneInputFile : TcConfig * Lexhelp.LexResourceManager * string list * string * isLastCompiland: (bool * bool) * ErrorLogger * (*retryLocked*) bool -> ParsedInput option
//----------------------------------------------------------------------------
// Type checking and querying the type checking state
//--------------------------------------------------------------------------
/// Get the initial type checking environment including the loading of mscorlib/System.Core, FSharp.Core
/// applying the InternalsVisibleTo in referenced assemblies and opening 'Checked' if requested.
val GetInitialTcEnv : assemblyName: string * range * TcConfig * TcImports * TcGlobals -> TcEnv
[<Sealed>]
/// Represents the incremental type checking state for a set of inputs
type TcState =
member NiceNameGenerator : Ast.NiceNameGenerator
/// The CcuThunk for the current assembly being checked
member Ccu : CcuThunk
/// Get the typing environment implied by the set of signature files and/or inferred signatures of implementation files checked so far
member TcEnvFromSignatures : TcEnv
/// Get the typing environment implied by the set of implemetation files checked so far
member TcEnvFromImpls : TcEnv
/// The inferred contents of the assembly, containing the signatures of all implemented files.
member PartialAssemblySignature : ModuleOrNamespaceType
member NextStateAfterIncrementalFragment : TcEnv -> TcState
/// Get the initial type checking state for a set of inputs
val GetInitialTcState :
range * string * TcConfig * TcGlobals * TcImports * Ast.NiceNameGenerator * TcEnv -> TcState
/// Check one input, returned as an Eventually computation
val TypeCheckOneInputEventually :
checkForErrors:(unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * NameResolution.TcResultsSink * TcState * Ast.ParsedInput
-> Eventually<(TcEnv * TopAttribs * TypedImplFile list) * TcState>
/// Finish the checking of multiple inputs
val TypeCheckMultipleInputsFinish : (TcEnv * TopAttribs * 'T list) list * TcState -> (TcEnv * TopAttribs * 'T list) * TcState
/// Finish the checking of a closed set of inputs
val TypeCheckClosedInputSetFinish : TypedImplFile list * TcState -> TcState * TypedImplFile list
/// Check a closed set of inputs
val TypeCheckClosedInputSet : CompilationThreadToken * checkForErrors: (unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * TcState * Ast.ParsedInput list -> TcState * TopAttribs * TypedImplFile list * TcEnv
/// Check a single input and finish the checking
val TypeCheckOneInputAndFinishEventually :
checkForErrors: (unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * NameResolution.TcResultsSink * TcState * Ast.ParsedInput
-> Eventually<(TcEnv * TopAttribs * TypedImplFile list) * TcState>
/// Indicates if we should report a warning
val ReportWarning : globalWarnLevel: int * specificWarnOff: int list * specificWarnOn: int list -> PhasedDiagnostic -> bool
/// Indicates if we should report a warning as an error
val ReportWarningAsError : globalWarnLevel: int * specificWarnOff: int list * specificWarnOn: int list * specificWarnAsError: int list * specificWarnAsWarn: int list * globalWarnAsError: bool -> PhasedDiagnostic -> bool
//----------------------------------------------------------------------------
// #load closure
//--------------------------------------------------------------------------
[<RequireQualifiedAccess>]
type CodeContext =
| Evaluation
| Compilation
| Editing
[<RequireQualifiedAccess>]
type LoadClosureInput =
{ FileName: string
SyntaxTree: ParsedInput option
ParseDiagnostics: (PhasedDiagnostic * bool) list
MetaCommandDiagnostics: (PhasedDiagnostic * bool) list }
[<RequireQualifiedAccess>]
type LoadClosure =
{ /// The source files along with the ranges of the #load positions in each file.
SourceFiles: (string * range list) list
/// The resolved references along with the ranges of the #r positions in each file.
References: (string * AssemblyResolution list) list
/// The list of references that were not resolved during load closure.
UnresolvedReferences : UnresolvedAssemblyReference list
/// The list of all sources in the closure with inputs when available, with associated parse errors and warnings
Inputs: LoadClosureInput list
/// The original #load references, including those that didn't resolve
OriginalLoadReferences: (range * string) list
/// The #nowarns
NoWarns: (string * range list) list
/// Diagnostics seen while processing resolutions
ResolutionDiagnostics : (PhasedDiagnostic * bool) list
/// Diagnostics to show for root of closure (used by fsc.fs)
AllRootFileDiagnostics : (PhasedDiagnostic * bool) list
/// Diagnostics seen while processing the compiler options implied root of closure
LoadClosureRootFileDiagnostics : (PhasedDiagnostic * bool) list }
// Used from service.fs, when editing a script file
static member ComputeClosureOfSourceText : CompilationThreadToken * referenceResolver: ReferenceResolver.Resolver * filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) * assumeDotNetFramework : bool -> LoadClosure
/// Used from fsi.fs and fsc.fs, for #load and command line. The resulting references are then added to a TcConfig.
static member ComputeClosureOfSourceFiles : CompilationThreadToken * tcConfig:TcConfig * (string * range) list * implicitDefines:CodeContext * lexResourceManager : Lexhelp.LexResourceManager -> LoadClosure