Skip to content

Commit 47dd515

Browse files
authored
Merge pull request #1338 from dsyme/semis-5
more code sanatization
2 parents aae9904 + 6a43fa1 commit 47dd515

16 files changed

+994
-1001
lines changed

src/fsharp/AugmentWithHashCompare.fs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -850,24 +850,24 @@ let TyconIsCandidateForAugmentationWithHash g tycon = TyconIsCandidateForAugment
850850
//-------------------------------------------------------------------------
851851

852852
let slotImplMethod (final,c,slotsig) : ValMemberInfo =
853-
{ ImplementedSlotSigs=[slotsig];
853+
{ ImplementedSlotSigs=[slotsig]
854854
MemberFlags=
855-
{ IsInstance=true;
856-
IsDispatchSlot=false;
857-
IsFinal=final;
858-
IsOverrideOrExplicitImpl=true;
859-
MemberKind=MemberKind.Member};
860-
IsImplemented=false;
855+
{ IsInstance=true
856+
IsDispatchSlot=false
857+
IsFinal=final
858+
IsOverrideOrExplicitImpl=true
859+
MemberKind=MemberKind.Member}
860+
IsImplemented=false
861861
ApparentParent=c}
862862

863863
let nonVirtualMethod c : ValMemberInfo =
864-
{ ImplementedSlotSigs=[];
865-
MemberFlags={ IsInstance=true;
866-
IsDispatchSlot=false;
867-
IsFinal=false;
868-
IsOverrideOrExplicitImpl=false;
869-
MemberKind=MemberKind.Member};
870-
IsImplemented=false;
864+
{ ImplementedSlotSigs=[]
865+
MemberFlags={ IsInstance=true
866+
IsDispatchSlot=false
867+
IsFinal=false
868+
IsOverrideOrExplicitImpl=false
869+
MemberKind=MemberKind.Member}
870+
IsImplemented=false
871871
ApparentParent=c}
872872

873873
let unitArg = ValReprInfo.unitArgData
@@ -945,7 +945,7 @@ let MakeBindingsForCompareAugmentation g (tycon:Tycon) =
945945
let thisv,thatv,comparee = comparef g tcref tycon
946946
mkLambdas m tps [thisv;thatv] (comparee,g.int_ty)
947947
[ // This one must come first because it may be inlined into the second
948-
mkCompGenBind vspec2 rhs2;
948+
mkCompGenBind vspec2 rhs2
949949
mkCompGenBind vspec1 rhs1; ]
950950
if tycon.IsUnionTycon then mkCompare mkUnionCompare
951951
elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkCompare mkRecdCompare
@@ -1016,8 +1016,8 @@ let MakeBindingsForEqualityWithComparerAugmentation g (tycon:Tycon) =
10161016

10171017
mkLambdas m tps [thisv; unitv] (hashe,g.int_ty)
10181018

1019-
[(mkCompGenBind withcGetHashCodeVal.Deref withcGetHashCodeExpr) ;
1020-
(mkCompGenBind objGetHashCodeVal.Deref objGetHashCodeExpr) ;
1019+
[(mkCompGenBind withcGetHashCodeVal.Deref withcGetHashCodeExpr)
1020+
(mkCompGenBind objGetHashCodeVal.Deref objGetHashCodeExpr)
10211021
(mkCompGenBind withcEqualsVal.Deref withcEqualsExpr)]
10221022
if tycon.IsUnionTycon then mkStructuralEquatable mkUnionHashWithComparer mkUnionEqualityWithComparer
10231023
elif (tycon.IsRecordTycon || tycon.IsStructOrEnumTycon) then mkStructuralEquatable mkRecdHashWithComparer mkRecdEqualityWithComparer
@@ -1054,8 +1054,8 @@ let MakeBindingsForEqualsAugmentation g (tycon:Tycon) =
10541054
mkLambdas m tps [thisv;thatobjv] (equalse,g.bool_ty)
10551055

10561056

1057-
[ mkCompGenBind nocEqualsVal.Deref nocEqualsExpr;
1058-
mkCompGenBind objEqualsVal.Deref objEqualsExpr; ]
1057+
[ mkCompGenBind nocEqualsVal.Deref nocEqualsExpr
1058+
mkCompGenBind objEqualsVal.Deref objEqualsExpr ]
10591059
if tycon.IsExceptionDecl then mkEquals mkExnEquality
10601060
elif tycon.IsUnionTycon then mkEquals mkUnionEquality
10611061
elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkEquals mkRecdEquality

src/fsharp/CompileOps.fs

Lines changed: 161 additions & 161 deletions
Large diffs are not rendered by default.

src/fsharp/CompileOptions.fs

Lines changed: 196 additions & 196 deletions
Large diffs are not rendered by default.

src/fsharp/ConstraintSolver.fs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,11 +1613,10 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint =
16131613
// Record a entry in the undo trace if one is provided
16141614
let d = tp.Data
16151615
let orig = d.typar_constraints
1616-
begin match trace with
1616+
match trace with
16171617
| NoTrace -> ()
16181618
| WithTrace trace -> trace.Push (fun () -> d.typar_constraints <- orig)
1619-
end;
1620-
d.typar_constraints <- newConstraints;
1619+
d.typar_constraints <- newConstraints
16211620

16221621
CompleteD)))
16231622

@@ -2403,7 +2402,7 @@ let EliminateConstraintsForGeneralizedTypars csenv trace (generalizedTypars: Typ
24032402
let cxs = cxst.FindAll tpn
24042403
if isNil cxs then () else
24052404
cxs |> List.iter (fun cx ->
2406-
cxst.Remove tpn;
2405+
cxst.Remove tpn
24072406
match trace with
24082407
| NoTrace -> ()
24092408
| WithTrace trace -> trace.Push (fun () -> (csenv.SolverState.ExtraCxs.Add (tpn,cx))))

src/fsharp/DetupleArgs.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ module GlobalUsageAnalysis =
227227
let logNonRecBinding z (bind:Binding) =
228228
let v = bind.Var
229229
let vs = FlatList.one v
230-
{z with RecursiveBindings = Zmap.add v (false,vs) z.RecursiveBindings;
230+
{z with RecursiveBindings = Zmap.add v (false,vs) z.RecursiveBindings
231231
Defns = Zmap.add v bind.Expr z.Defns }
232232

233233
/// Log the definition of a recursive binding
234234
let logRecBindings z binds =
235235
let vs = valsOfBinds binds
236-
{z with RecursiveBindings = (z.RecursiveBindings,vs) ||> FlatList.fold (fun mubinds v -> Zmap.add v (true,vs) mubinds);
236+
{z with RecursiveBindings = (z.RecursiveBindings,vs) ||> FlatList.fold (fun mubinds v -> Zmap.add v (true,vs) mubinds)
237237
Defns = (z.Defns,binds) ||> FlatList.fold (fun eqns bind -> Zmap.add bind.Var bind.Expr eqns) }
238238

239239
/// Work locally under a lambda of some kind
@@ -392,7 +392,7 @@ let rebuildTS g m ts vs =
392392
(x,ty),vs
393393

394394
let (x,_ty),vs = rebuild vs ts
395-
if vs.Length <> 0 then internalError "rebuildTS: had more fringe vars than fringe. REPORT BUG" else ();
395+
if vs.Length <> 0 then internalError "rebuildTS: had more fringe vars than fringe. REPORT BUG"
396396
x
397397

398398
/// CallPattern is tuple-structure for each argument position.
@@ -794,7 +794,7 @@ let passBind penv (TBind(fOrig,repr,letSeqPtOpt) as bind) =
794794
// fCBody - parts - formals
795795
let transformedFormals = trans.transformedFormals
796796
let p = transformedFormals.Length
797-
if (vss.Length < p) then internalError "passBinds: |vss|<p - detuple pass" else (); (* ASSERTION *)
797+
if (vss.Length < p) then internalError "passBinds: |vss|<p - detuple pass"
798798
let xqNs = List.drop p vss
799799
let x1ps = List.take p vss
800800
let y1Ps = List.concat (List.map2 transFormal transformedFormals x1ps)

0 commit comments

Comments
 (0)