diff --git a/src/absil/il.fs b/src/absil/il.fs index 19c6fc05e81..b065b9ff87b 100644 --- a/src/absil/il.fs +++ b/src/absil/il.fs @@ -170,7 +170,7 @@ let splitTypeNameRight nm = /// This is used to store event, property and field maps. type LazyOrderedMultiMap<'Key, 'Data when 'Key : equality>(keyf : 'Data -> 'Key, lazyItems : Lazy<'Data list>) = - let quickMap= + let quickMap = lazyItems |> lazyMap (fun entries -> let t = new Dictionary<_, _>(entries.Length, HashIdentity.Structural) do entries |> List.iter (fun y -> diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs index 9d14d0858de..11a1eb24a53 100644 --- a/src/absil/ilread.fs +++ b/src/absil/ilread.fs @@ -1671,7 +1671,7 @@ and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx = Locale= readStringHeapOption ctxt localeIdx CustomAttrsStored = ctxt.customAttrsReader_Assembly MetadataIndex = idx - AssemblyLongevity= + AssemblyLongevity = let masked = flags &&& 0x000e if masked = 0x0000 then ILAssemblyLongevity.Unspecified elif masked = 0x0002 then ILAssemblyLongevity.Library diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs index 2b6dd3d06d5..60ae0350b26 100644 --- a/src/absil/ilreflect.fs +++ b/src/absil/ilreflect.fs @@ -392,7 +392,7 @@ let emEnv0 = emEntryPts = [] delayedFieldInits = [] } -let envBindTypeRef emEnv (tref:ILTypeRef) (typT, typB, typeDef)= +let envBindTypeRef emEnv (tref:ILTypeRef) (typT, typB, typeDef) = match typT with | null -> failwithf "binding null type in envBindTypeRef: %s\n" tref.Name; | _ -> {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, None) emEnv.emTypMap} diff --git a/src/absil/ilwritepdb.fs b/src/absil/ilwritepdb.fs index 58dd9c241b6..0377916fd56 100644 --- a/src/absil/ilwritepdb.fs +++ b/src/absil/ilwritepdb.fs @@ -172,7 +172,7 @@ let pdbGetPdbDebugInfo (embeddedPDBChunk:BinaryChunk) (uncompressedLength:int64) iddChunk = embeddedPDBChunk; } -let pdbGetDebugInfo (mvid:byte[]) (timestamp:int32) (filepath:string) (cvChunk:BinaryChunk) (embeddedPDBChunk:BinaryChunk option) (uncompressedLength:int64) (stream:MemoryStream option)= +let pdbGetDebugInfo (mvid:byte[]) (timestamp:int32) (filepath:string) (cvChunk:BinaryChunk) (embeddedPDBChunk:BinaryChunk option) (uncompressedLength:int64) (stream:MemoryStream option) = match stream, embeddedPDBChunk with | None, _ | _, None -> [| pdbGetCvDebugInfo mvid timestamp filepath cvChunk |] | Some s, Some chunk -> [| pdbGetCvDebugInfo mvid timestamp filepath cvChunk; pdbGetPdbDebugInfo chunk uncompressedLength s; |] diff --git a/src/fsharp/AugmentWithHashCompare.fs b/src/fsharp/AugmentWithHashCompare.fs index 70fc0df123f..ed1b6f0cf09 100644 --- a/src/fsharp/AugmentWithHashCompare.fs +++ b/src/fsharp/AugmentWithHashCompare.fs @@ -704,7 +704,7 @@ let getAugmentationAttribs g (tycon:Tycon) = TryFindFSharpBoolAttribute g g.attrib_CustomComparisonAttribute tycon.Attribs, TryFindFSharpBoolAttribute g g.attrib_StructuralComparisonAttribute tycon.Attribs -let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon)= +let CheckAugmentationAttribs isImplementation g amap (tycon:Tycon) = let m = tycon.Range let attribs = getAugmentationAttribs g tycon match attribs with diff --git a/src/fsharp/CheckFormatStrings.fs b/src/fsharp/CheckFormatStrings.fs index bf1f6bbcb3e..7fd078de824 100644 --- a/src/fsharp/CheckFormatStrings.fs +++ b/src/fsharp/CheckFormatStrings.fs @@ -42,7 +42,7 @@ type FormatInfoRegister = mutable addZeros : bool mutable precision : bool} -let newInfo ()= +let newInfo () = { leftJustify = false numPrefixIfPos = None addZeros = false diff --git a/src/fsharp/LexFilter.fs b/src/fsharp/LexFilter.fs index 94c4634abe2..5ae8ebc3289 100755 --- a/src/fsharp/LexFilter.fs +++ b/src/fsharp/LexFilter.fs @@ -2207,7 +2207,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | IEEE32(v) -> delayMergedToken(IEEE32(if plus then v else -v)) | IEEE64(v) -> delayMergedToken(IEEE64(if plus then v else -v)) | DECIMAL(v) -> delayMergedToken(DECIMAL(if plus then v else System.Decimal.op_UnaryNegation v)) - | BIGNUM(v,s) -> delayMergedToken(BIGNUM((if plus then v else "-"^v),s)) + | BIGNUM(v,s) -> delayMergedToken(BIGNUM((if plus then v else "-" + v),s)) | _ -> noMerge() else noMerge() diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index 3fb3e816e0d..50eaca76414 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -4648,7 +4648,7 @@ let underlyingTypeOfEnumTy (g: TcGlobals) ty = let tycon = (tcrefOfAppTy g ty).Deref match tycon.GetFieldByName "value__" with | Some rf -> rf.FormalType - | None -> error(InternalError("no 'value__' field found for enumeration type "^tycon.LogicalName, tycon.Range)) + | None -> error(InternalError("no 'value__' field found for enumeration type " + tycon.LogicalName, tycon.Range)) // CLEANUP NOTE: Get rid of this mutation. @@ -5137,7 +5137,7 @@ and renameTycon tyenv x = let res = tyenv.tyconRefRemap.[mkLocalTyconRef x] res with :? KeyNotFoundException -> - errorR(InternalError("couldn't remap internal tycon "^showL(DebugPrint.tyconL x), x.Range)); + errorR(InternalError("couldn't remap internal tycon " + showL(DebugPrint.tyconL x), x.Range)); mkLocalTyconRef x tcref.Deref @@ -5179,7 +5179,7 @@ and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = let res = tmenvinner.tyconRefRemap.[mkLocalTyconRef tycon] res with :? KeyNotFoundException -> - errorR(InternalError("couldn't remap internal tycon "^showL(DebugPrint.tyconL tycon), tycon.Range)); + errorR(InternalError("couldn't remap internal tycon " + showL(DebugPrint.tyconL tycon), tycon.Range)); mkLocalTyconRef tycon tcref.Deref @@ -5683,7 +5683,7 @@ let rec simplifyTrivialMatch spBind exprm matchm ty tree (targets : _[]) = if n >= targets.Length then failwith "simplifyTrivialMatch: target out of range"; // REVIEW: should we use _spTarget here? let (TTarget(vs, rhs, _spTarget)) = targets.[n] - if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = "^string n^", List.length targets = "^string targets.Length); + if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = " + string n + ", List.length targets = " + string targets.Length); // These are non-sticky - any sequence point for 'rhs' goes on 'rhs' _after_ the bindings have been made mkInvisibleLetsFromBindings rhs.Range vs es rhs | _ -> @@ -6812,7 +6812,7 @@ let AdjustArityOfLambdaBody g arity (vs:Val list) body = if (untupledTys.Length <> arity) then failwith "length untupledTys <> arity"; let dummyvs, dummyes = untupledTys - |> List.mapi (fun i ty -> mkCompGenLocal v.Range (v.LogicalName ^"_"^string i) ty) + |> List.mapi (fun i ty -> mkCompGenLocal v.Range (v.LogicalName + "_" + string i) ty) |> List.unzip // These are non-sticky - any sequence point for 'body' goes on 'body' _after_ the binding has been made let body = mkInvisibleLet v.Range v (mkRefTupled g v.Range dummyes untupledTys) body @@ -7035,7 +7035,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex argtysl |> List.mapi (fun i argtys -> argtys |> List.mapi (fun j (_, argInfo) -> match argInfo.Name with - | None -> CompilerGeneratedName ("arg" + string i ^string j) + | None -> CompilerGeneratedName ("arg" + string i + string j) | Some id -> id.idText)) | _ -> [] @@ -7165,11 +7165,11 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex assert (inpArgTys.Length = actualArgTys.Length) - let inpsAsVars, inpsAsExprs = inpArgTys |> List.mapi (fun j ty -> mkCompGenLocal appm ("arg"^string i^string j) ty) |> List.unzip + let inpsAsVars, inpsAsExprs = inpArgTys |> List.mapi (fun j ty -> mkCompGenLocal appm ("arg" + string i + string j) ty) |> List.unzip let inpsAsActualArg = CoerceDetupled inpArgTys inpsAsExprs actualArgTys let inpCloVarType = (mkFunTy (mkRefTupledTy g actualArgTys) cloVar.Type) let newResTy = mkFunTy inpArgTy resTy - let inpCloVar, inpCloVarAsExpr = mkCompGenLocal appm ("clo"^string i) inpCloVarType + let inpCloVar, inpCloVarAsExpr = mkCompGenLocal appm ("clo" + string i) inpCloVarType let newRes = // For the final arg we can skip introducing the dummy variable if i = N - 1 then @@ -7209,7 +7209,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex let niceNames = match niceNames with | nms when nms.Length = inpArgTys.Length -> nms - | [nm] -> inpArgTys |> List.mapi (fun i _ -> (nm^string i)) + | [nm] -> inpArgTys |> List.mapi (fun i _ -> (nm + string i)) | nms -> nms match suppliedArg with | Some arg -> diff --git a/src/utils/prim-lexing.fs b/src/utils/prim-lexing.fs index 2a49afc5799..07859dbec71 100644 --- a/src/utils/prim-lexing.fs +++ b/src/utils/prim-lexing.fs @@ -171,7 +171,7 @@ namespace Internal.Utilities.Text.Lexing static member FromChars (arr:char[]) = LexBuffer.FromArrayNoCopy arr module GenericImplFragments = - let startInterpret(lexBuffer:LexBuffer)= + let startInterpret(lexBuffer:LexBuffer) = lexBuffer.BufferScanStart <- lexBuffer.BufferScanStart + lexBuffer.LexemeLength; lexBuffer.BufferMaxScanLength <- lexBuffer.BufferMaxScanLength - lexBuffer.LexemeLength; lexBuffer.BufferScanLength <- 0;