Skip to content

Commit e902dde

Browse files
authored
cleanup (#14406)
1 parent 6df0bab commit e902dde

File tree

3 files changed

+47
-56
lines changed

3 files changed

+47
-56
lines changed

src/Compiler/SyntaxTree/PrettyNaming.fs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,13 +1074,6 @@ let mkExceptionFieldName =
10741074
/// The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE
10751075
let FsiDynamicModulePrefix = "FSI_"
10761076

1077-
[<RequireQualifiedAccess>]
1078-
module FSharpLib =
1079-
let Root = "Microsoft.FSharp"
1080-
let RootPath = IL.splitNamespace Root
1081-
let Core = Root + ".Core"
1082-
let CorePath = IL.splitNamespace Core
1083-
10841077
[<RequireQualifiedAccess>]
10851078
module CustomOperations =
10861079
[<Literal>]

src/Compiler/SyntaxTree/PrettyNaming.fsi

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,6 @@ val internal mkExceptionFieldName: (int -> string)
255255
/// The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE
256256
val FsiDynamicModulePrefix: string
257257

258-
module internal FSharpLib =
259-
val Root: string
260-
val RootPath: string list
261-
val Core: string
262-
val CorePath: string list
263-
264258
module internal CustomOperations =
265259
[<Literal>]
266260
val Into: string = "into"

src/Compiler/TypedTree/TcGlobals.fs

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,37 @@ let ValRefForIntrinsic (IntrinsicValRef(mvr, _, _, _, key)) = mkNonLocalValRef
5151
[<AutoOpen>]
5252
module FSharpLib =
5353

54-
let CoreOperatorsCheckedName = FSharpLib.Root + ".Core.Operators.Checked"
55-
let ControlName = FSharpLib.Root + ".Control"
56-
let LinqName = FSharpLib.Root + ".Linq"
57-
let CollectionsName = FSharpLib.Root + ".Collections"
58-
let LanguagePrimitivesName = FSharpLib.Root + ".Core.LanguagePrimitives"
59-
let CompilerServicesName = FSharpLib.Root + ".Core.CompilerServices"
60-
let LinqRuntimeHelpersName = FSharpLib.Root + ".Linq.RuntimeHelpers"
61-
let RuntimeHelpersName = FSharpLib.Root + ".Core.CompilerServices.RuntimeHelpers"
62-
let ExtraTopLevelOperatorsName = FSharpLib.Root + ".Core.ExtraTopLevelOperators"
63-
let NativeInteropName = FSharpLib.Root + ".NativeInterop"
64-
65-
let QuotationsName = FSharpLib.Root + ".Quotations"
66-
67-
let ControlPath = splitNamespace ControlName
68-
let LinqPath = splitNamespace LinqName
69-
let CollectionsPath = splitNamespace CollectionsName
70-
let NativeInteropPath = splitNamespace NativeInteropName |> Array.ofList
71-
let CompilerServicesPath = splitNamespace CompilerServicesName |> Array.ofList
72-
let LinqRuntimeHelpersPath = splitNamespace LinqRuntimeHelpersName |> Array.ofList
73-
let RuntimeHelpersPath = splitNamespace RuntimeHelpersName |> Array.ofList
74-
let QuotationsPath = splitNamespace QuotationsName |> Array.ofList
75-
76-
let RootPathArray = FSharpLib.RootPath |> Array.ofList
77-
let CorePathArray = FSharpLib.CorePath |> Array.ofList
78-
let LinqPathArray = LinqPath |> Array.ofList
79-
let ControlPathArray = ControlPath |> Array.ofList
80-
let CollectionsPathArray = CollectionsPath |> Array.ofList
54+
let Root = "Microsoft.FSharp"
55+
let RootPath = splitNamespace Root
56+
let Core = Root + ".Core"
57+
let CorePath = splitNamespace Core
58+
let CoreOperatorsCheckedName = Root + ".Core.Operators.Checked"
59+
let ControlName = Root + ".Control"
60+
let LinqName = Root + ".Linq"
61+
let CollectionsName = Root + ".Collections"
62+
let LanguagePrimitivesName = Root + ".Core.LanguagePrimitives"
63+
let CompilerServicesName = Root + ".Core.CompilerServices"
64+
let LinqRuntimeHelpersName = Root + ".Linq.RuntimeHelpers"
65+
let RuntimeHelpersName = Root + ".Core.CompilerServices.RuntimeHelpers"
66+
let ExtraTopLevelOperatorsName = Root + ".Core.ExtraTopLevelOperators"
67+
let NativeInteropName = Root + ".NativeInterop"
68+
69+
let QuotationsName = Root + ".Quotations"
70+
71+
let ControlPath = splitNamespace ControlName
72+
let LinqPath = splitNamespace LinqName
73+
let CollectionsPath = splitNamespace CollectionsName
74+
let NativeInteropPath = splitNamespace NativeInteropName |> Array.ofList
75+
let CompilerServicesPath = splitNamespace CompilerServicesName |> Array.ofList
76+
let LinqRuntimeHelpersPath = splitNamespace LinqRuntimeHelpersName |> Array.ofList
77+
let RuntimeHelpersPath = splitNamespace RuntimeHelpersName |> Array.ofList
78+
let QuotationsPath = splitNamespace QuotationsName |> Array.ofList
79+
80+
let RootPathArray = RootPath |> Array.ofList
81+
let CorePathArray = CorePath |> Array.ofList
82+
let LinqPathArray = LinqPath |> Array.ofList
83+
let ControlPathArray = ControlPath |> Array.ofList
84+
let CollectionsPathArray = CollectionsPath |> Array.ofList
8185

8286
//-------------------------------------------------------------------------
8387
// Access the initial environment: helpers to build references
@@ -90,13 +94,13 @@ let private mkNonGenericTy tcref = TType_app(tcref, [], v_knownWithoutNull)
9094

9195
let mkNonLocalTyconRef2 ccu path n = mkNonLocalTyconRef (mkNonLocalEntityRef ccu path) n
9296

93-
let mk_MFCore_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CorePathArray n
94-
let mk_MFQuotations_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.QuotationsPath n
97+
let mk_MFCore_tcref ccu n = mkNonLocalTyconRef2 ccu CorePathArray n
98+
let mk_MFQuotations_tcref ccu n = mkNonLocalTyconRef2 ccu QuotationsPath n
9599
let mk_MFLinq_tcref ccu n = mkNonLocalTyconRef2 ccu LinqPathArray n
96-
let mk_MFCollections_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CollectionsPathArray n
97-
let mk_MFCompilerServices_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.CompilerServicesPath n
98-
let mk_MFRuntimeHelpers_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.RuntimeHelpersPath n
99-
let mk_MFControl_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.ControlPathArray n
100+
let mk_MFCollections_tcref ccu n = mkNonLocalTyconRef2 ccu CollectionsPathArray n
101+
let mk_MFCompilerServices_tcref ccu n = mkNonLocalTyconRef2 ccu CompilerServicesPath n
102+
let mk_MFRuntimeHelpers_tcref ccu n = mkNonLocalTyconRef2 ccu RuntimeHelpersPath n
103+
let mk_MFControl_tcref ccu n = mkNonLocalTyconRef2 ccu ControlPathArray n
100104

101105

102106
type
@@ -456,14 +460,14 @@ type TcGlobals(
456460

457461
let v_nil_ucref = mkUnionCaseRef v_list_tcr_canon "op_Nil"
458462

459-
let fslib_MF_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.RootPathArray
460-
let fslib_MFCore_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CorePathArray
461-
let fslib_MFLinq_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.LinqPathArray
462-
let fslib_MFCollections_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CollectionsPathArray
463-
let fslib_MFCompilerServices_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CompilerServicesPath
464-
let fslib_MFLinqRuntimeHelpers_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.LinqRuntimeHelpersPath
465-
let fslib_MFControl_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.ControlPathArray
466-
let fslib_MFNativeInterop_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.NativeInteropPath
463+
let fslib_MF_nleref = mkNonLocalEntityRef fslibCcu RootPathArray
464+
let fslib_MFCore_nleref = mkNonLocalEntityRef fslibCcu CorePathArray
465+
let fslib_MFLinq_nleref = mkNonLocalEntityRef fslibCcu LinqPathArray
466+
let fslib_MFCollections_nleref = mkNonLocalEntityRef fslibCcu CollectionsPathArray
467+
let fslib_MFCompilerServices_nleref = mkNonLocalEntityRef fslibCcu CompilerServicesPath
468+
let fslib_MFLinqRuntimeHelpers_nleref = mkNonLocalEntityRef fslibCcu LinqRuntimeHelpersPath
469+
let fslib_MFControl_nleref = mkNonLocalEntityRef fslibCcu ControlPathArray
470+
let fslib_MFNativeInterop_nleref = mkNonLocalEntityRef fslibCcu NativeInteropPath
467471

468472
let fslib_MFLanguagePrimitives_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "LanguagePrimitives"
469473
let fslib_MFIntrinsicOperators_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "IntrinsicOperators"
@@ -587,10 +591,10 @@ type TcGlobals(
587591
| None -> TType_app(tcref, l, v_knownWithoutNull)
588592

589593
let mk_MFCore_attrib nm : BuiltinAttribInfo =
590-
AttribInfo(mkILTyRef(ilg.fsharpCoreAssemblyScopeRef, FSharpLib.Core + "." + nm), mk_MFCore_tcref fslibCcu nm)
594+
AttribInfo(mkILTyRef(ilg.fsharpCoreAssemblyScopeRef, Core + "." + nm), mk_MFCore_tcref fslibCcu nm)
591595

592596
let mk_MFCompilerServices_attrib nm : BuiltinAttribInfo =
593-
AttribInfo(mkILTyRef(ilg.fsharpCoreAssemblyScopeRef, FSharpLib.Core + "." + nm), mk_MFCompilerServices_tcref fslibCcu nm)
597+
AttribInfo(mkILTyRef(ilg.fsharpCoreAssemblyScopeRef, Core + "." + nm), mk_MFCompilerServices_tcref fslibCcu nm)
594598

595599
let mkSourceDoc fileName = ILSourceDocument.Create(language=None, vendor=None, documentType=None, file=fileName)
596600

0 commit comments

Comments
 (0)