Skip to content

Commit 1599020

Browse files
committed
Format using 5.0.3.
1 parent 60a913c commit 1599020

File tree

10 files changed

+25
-69
lines changed

10 files changed

+25
-69
lines changed

src/Compiler/CodeGen/IlxGen.fs

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,9 +2840,7 @@ let ComputeDebugPointForBinding g bind =
28402840
| DebugPointAtBinding.NoneAtDo, _ -> false, None
28412841
| DebugPointAtBinding.NoneAtLet, _ -> false, None
28422842
// Don't emit debug points for lambdas.
2843-
| _,
2844-
(Expr.Lambda _
2845-
| Expr.TyLambda _) -> false, None
2843+
| _, (Expr.Lambda _ | Expr.TyLambda _) -> false, None
28462844
| DebugPointAtBinding.Yes m, _ -> false, Some m
28472845

28482846
//-------------------------------------------------------------------------
@@ -5134,21 +5132,10 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel =
51345132
// For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa)
51355133
| ([ AI_ceq ],
51365134
[ arg1
5137-
Expr.Const ((Const.Bool false
5138-
| Const.SByte 0y
5139-
| Const.Int16 0s
5140-
| Const.Int32 0
5141-
| Const.Int64 0L
5142-
| Const.Byte 0uy
5143-
| Const.UInt16 0us
5144-
| Const.UInt32 0u
5145-
| Const.UInt64 0UL),
5135+
Expr.Const ((Const.Bool false | Const.SByte 0y | Const.Int16 0s | Const.Int32 0 | Const.Int64 0L | Const.Byte 0uy | Const.UInt16 0us | Const.UInt32 0u | Const.UInt64 0UL),
51465136
_,
51475137
_) ],
5148-
CmpThenBrOrContinue (1,
5149-
[ I_brcmp ((BI_brfalse
5150-
| BI_brtrue) as bi,
5151-
label1) ]),
5138+
CmpThenBrOrContinue (1, [ I_brcmp ((BI_brfalse | BI_brtrue) as bi, label1) ]),
51525139
_) ->
51535140

51545141
let bi =
@@ -7903,9 +7890,7 @@ and GenDecisionTreeTest
79037890
// If so, emit the failure logic, then came back and do the success target, then
79047891
// do any postponed failure target.
79057892
match successTree, failureTree with
7906-
| TDSuccess _,
7907-
(TDBind _
7908-
| TDSwitch _) ->
7893+
| TDSuccess _, (TDBind _ | TDSwitch _) ->
79097894

79107895
// OK, there is more logic in the decision tree on the failure branch
79117896
let success = CG.GenerateDelayMark cgbuf "testSuccess"
@@ -10641,10 +10626,9 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) =
1064110626
| None -> None
1064210627
| Some memberInfo ->
1064310628
match name, memberInfo.MemberFlags.MemberKind with
10644-
| ("Item"
10645-
| "op_IndexedLookup"),
10646-
(SynMemberKind.PropertyGet
10647-
| SynMemberKind.PropertySet) when not (isNil (ArgInfosOfPropertyVal g vref.Deref)) ->
10629+
| ("Item" | "op_IndexedLookup"), (SynMemberKind.PropertyGet | SynMemberKind.PropertySet) when
10630+
not (isNil (ArgInfosOfPropertyVal g vref.Deref))
10631+
->
1064810632
Some(
1064910633
mkILCustomAttribute (
1065010634
g.FindSysILTypeRef "System.Reflection.DefaultMemberAttribute",

src/Compiler/Driver/ParseAndCheckInputs.fs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,7 @@ let ProcessMetaCommandsFromInput
845845
| ParsedHashDirective ("nowarn", ParsedHashDirectiveArguments numbers, m) ->
846846
List.fold (fun state d -> nowarnF state (m, d)) state numbers
847847

848-
| ParsedHashDirective (("reference"
849-
| "r"),
850-
ParsedHashDirectiveArguments args,
851-
m) ->
848+
| ParsedHashDirective (("reference" | "r"), ParsedHashDirectiveArguments args, m) ->
852849
matchedm <- m
853850
ProcessDependencyManagerDirective Directive.Resolution args m state
854851

src/Compiler/Service/FSharpCheckerResults.fs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,7 @@ type FSharpSymbolUse(denv: DisplayEnv, symbol: FSharpSymbol, inst: TyparInstanti
247247
// 'seq' in 'seq { ... }' gets colored as keywords
248248
| Item.Value vref, ItemOccurence.Use when valRefEq denv.g denv.g.seq_vref vref -> true
249249
// custom builders, custom operations get colored as keywords
250-
| (Item.CustomBuilder _
251-
| Item.CustomOperation _),
252-
ItemOccurence.Use -> true
250+
| (Item.CustomBuilder _ | Item.CustomOperation _), ItemOccurence.Use -> true
253251
| _ -> false
254252

255253
member _.IsFromOpenStatement = itemOcc = ItemOccurence.Open
@@ -2306,14 +2304,8 @@ module internal ParseAndCheckFile =
23062304

23072305
matchBraces stackAfterMatch
23082306

2309-
| LPAREN
2310-
| LBRACE _
2311-
| LBRACK
2312-
| LBRACE_BAR
2313-
| LBRACK_BAR
2314-
| LQUOTE _
2315-
| LBRACK_LESS as tok,
2316-
_ -> matchBraces ((tok, lexbuf.LexemeRange) :: stack)
2307+
| LPAREN | LBRACE _ | LBRACK | LBRACE_BAR | LBRACK_BAR | LQUOTE _ | LBRACK_LESS as tok, _ ->
2308+
matchBraces ((tok, lexbuf.LexemeRange) :: stack)
23172309

23182310
// INTERP_STRING_BEGIN_PART corresponds to $"... {" at the start of an interpolated string
23192311
//
@@ -2322,19 +2314,15 @@ module internal ParseAndCheckFile =
23222314
// interpolation expression)
23232315
//
23242316
// Either way we start a new potential match at the last character
2325-
| INTERP_STRING_BEGIN_PART _
2326-
| INTERP_STRING_PART _ as tok,
2327-
_ ->
2317+
| INTERP_STRING_BEGIN_PART _ | INTERP_STRING_PART _ as tok, _ ->
23282318
let m = lexbuf.LexemeRange
23292319

23302320
let m2 =
23312321
mkFileIndexRange m.FileIndex (mkPos m.End.Line (max (m.End.Column - 1) 0)) m.End
23322322

23332323
matchBraces ((tok, m2) :: stack)
23342324

2335-
| (EOF _
2336-
| LEX_FAILURE _),
2337-
_ -> ()
2325+
| (EOF _ | LEX_FAILURE _), _ -> ()
23382326
| _ -> matchBraces stack
23392327

23402328
matchBraces [])

src/Compiler/Service/SemanticClassification.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,8 @@ module TcResolutionsExtensions =
212212
resolutions
213213
|> Array.iter (fun cnr ->
214214
match cnr.Item, cnr.ItemOccurence, cnr.Range with
215-
| (Item.CustomBuilder _
216-
| Item.CustomOperation _),
217-
ItemOccurence.Use,
218-
m -> add m SemanticClassificationType.ComputationExpression
215+
| (Item.CustomBuilder _ | Item.CustomOperation _), ItemOccurence.Use, m ->
216+
add m SemanticClassificationType.ComputationExpression
219217

220218
| Item.Value vref, _, m when isValRefMutable g vref -> add m SemanticClassificationType.MutableVar
221219

src/Compiler/Service/ServiceLexing.fs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,9 @@ module internal TokenClassifications =
205205
// (this isn't entirely correct, but it'll work for now - see bug 3727)
206206
(FSharpTokenColorKind.Number, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.None)
207207

208-
| INFIX_STAR_DIV_MOD_OP ("mod"
209-
| "land"
210-
| "lor"
211-
| "lxor")
212-
| INFIX_STAR_STAR_OP ("lsl"
213-
| "lsr"
214-
| "asr") -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None)
208+
| INFIX_STAR_DIV_MOD_OP ("mod" | "land" | "lor" | "lxor")
209+
| INFIX_STAR_STAR_OP ("lsl" | "lsr" | "asr") ->
210+
(FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None)
215211

216212
| LPAREN_STAR_RPAREN
217213
| DOLLAR

src/Compiler/Service/ServiceParsedInputOps.fs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,10 +2035,7 @@ module ParsedInput =
20352035
result <- Some(oldScope, oldPos, true)
20362036
| Some (oldScope, oldPos, _), _ ->
20372037
match kind, oldScope.Kind with
2038-
| (Namespace
2039-
| NestedModule
2040-
| TopModule),
2041-
OpenDeclaration
2038+
| (Namespace | NestedModule | TopModule), OpenDeclaration
20422039
| _ when oldPos.Line <= line ->
20432040
result <-
20442041
Some(

src/Compiler/TypedTree/QuotationPickler.fsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/// Code to pickle out quotations in the quotation binary format.
44
module internal FSharp.Compiler.QuotationPickler
5+
56
#nowarn "1178"
67

78
type TypeData

src/FSharp.Core/local.fsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
22

33
namespace Microsoft.FSharp.Core
4+
45
open Microsoft.FSharp.Core
56

67
[<AutoOpen>]

src/FSharp.Core/quotations.fs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -942,14 +942,8 @@ module Patterns =
942942
| VarSetOp, _
943943
| AddressSetOp, _ -> typeof<Unit>
944944
| AddressOfOp, [ expr ] -> (typeOf expr).MakeByRefType()
945-
| (AddressOfOp
946-
| QuoteOp _
947-
| SequentialOp
948-
| TryWithOp
949-
| TryFinallyOp
950-
| IfThenElseOp
951-
| AppOp),
952-
_ -> failwith "unreachable"
945+
| (AddressOfOp | QuoteOp _ | SequentialOp | TryWithOp | TryFinallyOp | IfThenElseOp | AppOp), _ ->
946+
failwith "unreachable"
953947

954948
//--------------------------------------------------------------------------
955949
// Constructors for building Raw quotations
@@ -2933,8 +2927,7 @@ module DerivedPatterns =
29332927
let (|SpecificCall|_|) templateParameter =
29342928
// Note: precomputation
29352929
match templateParameter with
2936-
| (Lambdas (_, Call (_, minfo1, _))
2937-
| Call (_, minfo1, _)) ->
2930+
| (Lambdas (_, Call (_, minfo1, _)) | Call (_, minfo1, _)) ->
29382931
let isg1 = minfo1.IsGenericMethod
29392932

29402933
let gmd =

src/FSharp.Core/seqcore.fsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
22

33
namespace Microsoft.FSharp.Collections
4+
45
open System
56
open System.Collections
67
open System.Collections.Generic

0 commit comments

Comments
 (0)