Skip to content

Commit 15920da

Browse files
committed
Cleanup: remove redundant qualifiers
1 parent 1695c5e commit 15920da

File tree

94 files changed

+1289
-1289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1289
-1289
lines changed

src/Compiler/AbstractIL/il.fsi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ type ILAssemblyRef =
111111

112112
member EqualsIgnoringVersion: ILAssemblyRef -> bool
113113

114-
interface System.IComparable
114+
interface IComparable
115115

116116
[<Sealed>]
117117
type ILModuleRef =
@@ -123,7 +123,7 @@ type ILModuleRef =
123123

124124
member Hash: byte[] option
125125

126-
interface System.IComparable
126+
interface IComparable
127127

128128
// Scope references
129129
[<StructuralEquality; StructuralComparison; RequireQualifiedAccess>]
@@ -239,7 +239,7 @@ type ILTypeRef =
239239

240240
override ToString: unit -> string
241241

242-
interface System.IComparable
242+
interface IComparable
243243

244244
/// Type specs and types.
245245
[<Sealed>]
@@ -267,7 +267,7 @@ type ILTypeSpec =
267267

268268
member internal EqualsWithPrimaryScopeRef: ILScopeRef * obj -> bool
269269

270-
interface System.IComparable
270+
interface IComparable
271271

272272
[<RequireQualifiedAccess; StructuralEquality; StructuralComparison>]
273273
type ILType =
@@ -371,7 +371,7 @@ type ILMethodRef =
371371

372372
member GetCallingSignature: unit -> ILCallingSignature
373373

374-
interface System.IComparable
374+
interface IComparable
375375

376376
/// Formal identities of fields.
377377
[<StructuralEquality; StructuralComparison>]
@@ -403,7 +403,7 @@ type ILMethodSpec =
403403

404404
member FormalReturnType: ILType
405405

406-
interface System.IComparable
406+
interface IComparable
407407

408408
/// Field specs. The data given for a ldfld, stfld etc. instruction.
409409
[<StructuralEquality; StructuralComparison>]
@@ -2490,7 +2490,7 @@ type internal ILPropertyRef =
24902490
static member Create: ILTypeRef * string -> ILPropertyRef
24912491
member DeclaringTypeRef: ILTypeRef
24922492
member Name: string
2493-
interface System.IComparable
2493+
interface IComparable
24942494

24952495
type ILReferences =
24962496
{ AssemblyReferences: ILAssemblyRef[]

src/Compiler/AbstractIL/ilreflect.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ let emEnv0 =
550550
delayedFieldInits = []
551551
}
552552

553-
let envBindTypeRef emEnv (tref: ILTypeRef) (typT: System.Type MaybeNull, typB, typeDef) =
553+
let envBindTypeRef emEnv (tref: ILTypeRef) (typT: Type MaybeNull, typB, typeDef) =
554554
match typT with
555555
| Null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name
556556
| NonNull typT ->

src/Compiler/AbstractIL/ilwrite.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,7 @@ let GenMethodDefSigAsBlobIdx cenv env mdef =
26232623
GetBytesAsBlobIdx cenv (GetMethodDefSigAsBytes cenv env mdef)
26242624

26252625
let ilMethodBodyThrowNull =
2626-
let ilCode = IL.buildILCode "" (Dictionary()) [|ILInstr.AI_ldnull; ILInstr.I_throw|] [] []
2626+
let ilCode = buildILCode "" (Dictionary()) [|ILInstr.AI_ldnull; ILInstr.I_throw|] [] []
26272627
mkILMethodBody(false, ILLocals.Empty, 0, ilCode, None, None)
26282628

26292629
let GenMethodDefAsRow cenv env midx (mdef: ILMethodDef) =
@@ -4166,7 +4166,7 @@ let writeBinaryAux (stream: Stream, options: options, modul, normalizeAssemblyRe
41664166
[| hCode
41674167
hData
41684168
match options.referenceAssemblyOnly, options.referenceAssemblySignatureHash with
4169-
| true, Some impliedSigHash -> System.BitConverter.GetBytes(impliedSigHash)
4169+
| true, Some impliedSigHash -> BitConverter.GetBytes(impliedSigHash)
41704170
| _ -> sha.ComputeHash metadata |]
41714171
|> Array.collect id
41724172
|> sha.ComputeHash

src/Compiler/Checking/AttributeChecking.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let rec private evalFSharpAttribArg g attribExpr =
7676

7777
type AttribInfo =
7878
| FSAttribInfo of TcGlobals * Attrib
79-
| ILAttribInfo of TcGlobals * Import.ImportMap * ILScopeRef * ILAttribute * range
79+
| ILAttribInfo of TcGlobals * ImportMap * ILScopeRef * ILAttribute * range
8080

8181
member x.Range =
8282
match x with

src/Compiler/Checking/CheckDeclarations.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ let AddRootModuleOrNamespaceRefs g amap m env modrefs =
309309

310310
/// Adjust the TcEnv to make more things 'InternalsVisibleTo'
311311
let addInternalsAccessibility env (ccu: CcuThunk) =
312-
let compPath = CompPath (ccu.ILScopeRef, TypedTree.SyntaxAccess.Unknown, [])
312+
let compPath = CompPath (ccu.ILScopeRef, SyntaxAccess.Unknown, [])
313313
let eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths
314314
{ env with
315315
eAccessRights = ComputeAccessRights env.eAccessPath eInternalsVisibleCompPaths env.eFamilyType // update this computed field
@@ -1180,7 +1180,7 @@ module MutRecBindingChecking =
11801180
TyconBindingPhase2A.Phase2AMember {
11811181
SyntacticBinding = NormalizedBinding(pat = SynPat.Named(ident = SynIdent(ident = Get_OrSet_Ident & setIdent)))
11821182
RecBindingInfo = RecursiveBindingInfo(vspec = vSet)
1183-
} when Range.equals getIdent.idRange setIdent.idRange ->
1183+
} when equals getIdent.idRange setIdent.idRange ->
11841184
match vGet.ApparentEnclosingEntity with
11851185
| ParentNone -> ()
11861186
| Parent parentRef ->

src/Compiler/Checking/CheckFormatStrings.fs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ let escapeDotnetFormatString str =
5555
// We need to double '{' and '}', because even if they were escaped in the
5656
// original string, extra curly braces were stripped away by the F# lexer.
5757
|> Seq.collect (fun x -> if x = '{' || x = '}' then [x;x] else [x])
58-
|> System.String.Concat
58+
|> String.Concat
5959

6060
[<return: Struct>]
6161
let (|PrefixedBy|_|) (prefix: string) (str: string) =
@@ -140,13 +140,13 @@ module internal Parse =
140140
let rec digitsPrecision (fmt: string) (fmtPos: int) =
141141
if fmtPos >= fmt.Length then failwith (FSComp.SR.forBadPrecision())
142142
match fmt[fmtPos] with
143-
| c when System.Char.IsDigit c -> digitsPrecision fmt (fmtPos+1)
143+
| c when Char.IsDigit c -> digitsPrecision fmt (fmtPos+1)
144144
| _ -> fmtPos
145145

146146
let precision (info: FormatInfoRegister) (fmt: string) (fmtPos: int) =
147147
if fmtPos >= fmt.Length then failwith (FSComp.SR.forBadWidth())
148148
match fmt[fmtPos] with
149-
| c when System.Char.IsDigit c -> info.precision <- true; false,digitsPrecision fmt (fmtPos+1)
149+
| c when Char.IsDigit c -> info.precision <- true; false,digitsPrecision fmt (fmtPos+1)
150150
| '*' -> info.precision <- true; true,(fmtPos+1)
151151
| _ -> failwith (FSComp.SR.forPrecisionMissingAfterDot())
152152

@@ -161,14 +161,14 @@ module internal Parse =
161161
let rec go pos n =
162162
if pos >= len then failwith (FSComp.SR.forBadPrecision())
163163
match fmt[pos] with
164-
| c when System.Char.IsDigit c -> go (pos+1) (n*10 + int c - int '0')
164+
| c when Char.IsDigit c -> go (pos+1) (n*10 + int c - int '0')
165165
| _ -> Some n, optionalDotAndPrecision info fmt pos
166166
go fmtPos intAcc
167167

168168
let widthAndPrecision (info: FormatInfoRegister) (fmt: string) (fmtPos: int) =
169169
if fmtPos >= fmt.Length then failwith (FSComp.SR.forBadPrecision())
170170
match fmt[fmtPos] with
171-
| c when System.Char.IsDigit c -> false,digitsWidthAndPrecision info fmt fmtPos 0
171+
| c when Char.IsDigit c -> false,digitsWidthAndPrecision info fmt fmtPos 0
172172
| '*' -> true, (None, optionalDotAndPrecision info fmt (fmtPos+1))
173173
| _ -> false, (None, optionalDotAndPrecision info fmt fmtPos)
174174

@@ -178,7 +178,7 @@ module internal Parse =
178178
let rec digitsPosition n pos =
179179
if pos >= len then failwith (FSComp.SR.forBadPrecision())
180180
match fmt[pos] with
181-
| c when System.Char.IsDigit c -> digitsPosition (n*10 + int c - int '0') (pos+1)
181+
| c when Char.IsDigit c -> digitsPosition (n*10 + int c - int '0') (pos+1)
182182
| '$' -> Some n, pos+1
183183
| _ -> None, pos
184184

@@ -296,7 +296,7 @@ let parseFormatStringInternal
296296
else
297297
failwith (FSComp.SR.forPositionalSpecifiersNotPermitted())
298298
argTys
299-
elif System.Char.IsSurrogatePair(fmt,i) then
299+
elif Char.IsSurrogatePair(fmt,i) then
300300
appendToDotnetFormatString fmt[i..i+1]
301301
parseLoop acc (i+2, fragLine, fragCol+2) fragments
302302
else
@@ -397,7 +397,7 @@ let parseFormatStringInternal
397397
let ch = fmt[i]
398398
match ch with
399399
| 'd' | 'i' | 'u' | 'B' | 'o' | 'x' | 'X' ->
400-
if ch = 'B' then DiagnosticsLogger.checkLanguageFeatureError g.langVersion Features.LanguageFeature.PrintfBinaryFormat m
400+
if ch = 'B' then checkLanguageFeatureError g.langVersion Features.LanguageFeature.PrintfBinaryFormat m
401401
if info.precision then failwith (FSComp.SR.forFormatDoesntSupportPrecision(ch.ToString()))
402402
collectSpecifierLocation fragLine fragCol 1
403403
let i = skipPossibleInterpolationHole (i+1)

src/Compiler/Checking/ConstraintSolver.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ open FSharp.Compiler.TypeProviders
8080
// of the constraint resolution carried out by type checking.
8181
//-------------------------------------------------------------------------
8282

83-
let compgenId = mkSynId Range.range0 unassignedTyparName
83+
let compgenId = mkSynId range0 unassignedTyparName
8484

8585
let NewCompGenTypar (kind, rigid, staticReq, dynamicReq, error) =
8686
Construct.NewTypar(kind, rigid, SynTypar(compgenId, staticReq, true), error, dynamicReq, [], false, false)

src/Compiler/Checking/Expressions/CheckComputationExpressions.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ let rec TryTranslateComputationExpression
13811381

13821382
let condBinding =
13831383
mkSynBinding
1384-
(Xml.PreXmlDoc.Empty, patCond)
1384+
(PreXmlDoc.Empty, patCond)
13851385
(None,
13861386
false,
13871387
true,
@@ -1545,7 +1545,7 @@ let rec TryTranslateComputationExpression
15451545
// and so we use a more specific error message for clarity.
15461546
| SynExpr.Const(SynConst.Unit, mUnit) when
15471547
cenv.g.langVersion.SupportsFeature LanguageFeature.EmptyBodiedComputationExpressions
1548-
&& Range.equals mUnit range0
1548+
&& equals mUnit range0
15491549
->
15501550
error (Error(FSComp.SR.tcEmptyBodyRequiresBuilderZeroMethod (), ceenv.mWhole))
15511551
| _ -> error (Error(FSComp.SR.tcRequireBuilderMethod ("Zero"), m))

src/Compiler/Checking/Expressions/CheckExpressions.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4967,7 +4967,7 @@ and CrackStaticConstantArgs (cenv: cenv) env tpenv (staticParameters: Tainted<Pr
49674967

49684968
let argsInStaticParameterOrderIncludingDefaults =
49694969
staticParameters |> Array.mapi (fun i sp ->
4970-
let spKind = Import.ImportProvidedType cenv.amap m (sp.PApply((fun x -> x.ParameterType), m))
4970+
let spKind = ImportProvidedType cenv.amap m (sp.PApply((fun x -> x.ParameterType), m))
49714971
let spName = sp.PUntaint((fun sp -> sp.Name), m)
49724972
if i < unnamedArgs.Length then
49734973
let v = unnamedArgs[i]
@@ -5050,7 +5050,7 @@ and TcProvidedTypeApp (cenv: cenv) env tpenv tcref args m =
50505050
if hasNoArgs then
50515051
mkWoNullAppTy tcref [], tpenv
50525052
else
5053-
let ty = Import.ImportProvidedType cenv.amap m providedTypeAfterStaticArguments
5053+
let ty = ImportProvidedType cenv.amap m providedTypeAfterStaticArguments
50545054
ty, tpenv
50555055
#endif
50565056

@@ -6598,11 +6598,11 @@ and ExpandIndexArgs (cenv: cenv) (synLeftExprOpt: SynExpr option) indexArgs =
65986598

65996599
let mkSynSomeExpr (m: range) x =
66006600
let m = m.MakeSynthetic()
6601-
SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynLidGet m FSharpLib.CorePath "Some", x, m)
6601+
SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynLidGet m CorePath "Some", x, m)
66026602

66036603
let mkSynNoneExpr (m: range) =
66046604
let m = m.MakeSynthetic()
6605-
mkSynLidGet m FSharpLib.CorePath "None"
6605+
mkSynLidGet m CorePath "None"
66066606

66076607
let expandedIndexArgs =
66086608
indexArgs
@@ -10440,7 +10440,7 @@ and TcSetterArgExpr (cenv: cenv) env denv objExpr ad assignedSetter calledFromCo
1044010440
MethInfoChecks g cenv.amap true None [objExpr] ad m pminfo
1044110441
let calledArgTy = List.head (List.head (pminfo.GetParamTypes(cenv.amap, m, pminst)))
1044210442
let tcVal = LightweightTcValForUsingInBuildMethodCall g
10443-
let argExprPrebinder, argExpr = MethodCalls.AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
10443+
let argExprPrebinder, argExpr = AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
1044410444
let mut = (if isStructTy g (tyOfExpr g objExpr) then DefinitelyMutates else PossiblyMutates)
1044510445
let action = BuildPossiblyConditionalMethodCall cenv env mut m true pminfo NormalValUse pminst [objExpr] [argExpr] propStaticTyOpt |> fst
1044610446
argExprPrebinder, action, Item.Property (pinfo.PropertyName, [pinfo], None)
@@ -10450,7 +10450,7 @@ and TcSetterArgExpr (cenv: cenv) env denv objExpr ad assignedSetter calledFromCo
1045010450
ILFieldInstanceChecks g cenv.amap ad m finfo
1045110451
let calledArgTy = finfo.FieldType (cenv.amap, m)
1045210452
let tcVal = LightweightTcValForUsingInBuildMethodCall g
10453-
let argExprPrebinder, argExpr = MethodCalls.AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
10453+
let argExprPrebinder, argExpr = AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
1045410454
let action = BuildILFieldSet g m objExpr finfo argExpr
1045510455
argExprPrebinder, action, Item.ILField finfo
1045610456

@@ -10459,7 +10459,7 @@ and TcSetterArgExpr (cenv: cenv) env denv objExpr ad assignedSetter calledFromCo
1045910459
let calledArgTy = rfinfo.FieldType
1046010460
CheckRecdFieldMutation m denv rfinfo
1046110461
let tcVal = LightweightTcValForUsingInBuildMethodCall g
10462-
let argExprPrebinder, argExpr = MethodCalls.AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
10462+
let argExprPrebinder, argExpr = AdjustCallerArgExpr tcVal g cenv.amap cenv.infoReader ad false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr
1046310463
let action = BuildRecdFieldSet g m objExpr rfinfo argExpr
1046410464
argExprPrebinder, action, Item.RecdField rfinfo
1046510465

src/Compiler/Checking/InfoReader.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ type private IndexedList<'T>(itemLists: 'T list list, itemsByName: NameMultiMap<
352352

353353
/// An InfoReader is an object to help us read and cache infos.
354354
/// We create one of these for each file we typecheck.
355-
type InfoReader(g: TcGlobals, amap: Import.ImportMap) as this =
355+
type InfoReader(g: TcGlobals, amap: ImportMap) as this =
356356

357357
/// Get the declared IL fields of a type, not including inherited fields
358358
let GetImmediateIntrinsicILFieldsOfType (optFilter, ad) m ty =

0 commit comments

Comments
 (0)