Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6351e57

Browse files
committed
formatting
1 parente4f03a5 commit6351e57

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎src/fsharp/ConstraintSolver.fs‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -558,21 +558,21 @@ let rec SimplifyMeasuresInType g resultFirst ((generalizable, generalized) as pa
558558

559559
andSimplifyMeasuresInTypes g param tys=
560560
match tyswith
561-
|[]->param
561+
|[]-> param
562562
| ty::tys->
563563
letparam'= SimplifyMeasuresInType gfalse param ty
564564
SimplifyMeasuresInTypes g param' tys
565565

566566
letSimplifyMeasuresInConstraint g param c=
567567
match cwith
568-
| TyparConstraint.DefaultsTo(_,ty,_)| TyparConstraint.CoercesTo(ty,_)-> SimplifyMeasuresInType gfalse param ty
569-
| TyparConstraint.SimpleChoice(tys,_)-> SimplifyMeasuresInTypes g param tys
570-
| TyparConstraint.IsDelegate(ty1,ty2,_)-> SimplifyMeasuresInTypes g param[ty1;ty2]
571-
|_-> param
568+
| TyparConstraint.DefaultsTo(_,ty,_)| TyparConstraint.CoercesTo(ty,_)-> SimplifyMeasuresInType gfalse param ty
569+
| TyparConstraint.SimpleChoice(tys,_)-> SimplifyMeasuresInTypes g param tys
570+
| TyparConstraint.IsDelegate(ty1,ty2,_)-> SimplifyMeasuresInTypes g param[ty1;ty2]
571+
|_-> param
572572

573573
let recSimplifyMeasuresInConstraints g param cs=
574574
match cswith
575-
|[]->param
575+
|[]-> param
576576
| c::cs->
577577
letparam'= SimplifyMeasuresInConstraint g param c
578578
SimplifyMeasuresInConstraints g param' cs
@@ -590,7 +590,7 @@ let rec GetMeasureVarGcdInType v ty =
590590

591591
andGetMeasureVarGcdInTypes v tys=
592592
match tyswith
593-
|[]->ZeroRational
593+
|[]-> ZeroRational
594594
| ty::tys-> GcdRational(GetMeasureVarGcdInType v ty)(GetMeasureVarGcdInTypes v tys)
595595

596596
// Normalize the exponents on generalizable variables in a type
@@ -657,11 +657,11 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty =
657657
not tp2.IsCompilerGenerated&&
658658
(r.IsCompilerGenerated||
659659
// exclude this warning for two identically named user-specified type parameters, e.g. from different mutually recursive functions or types
660-
r.DisplayName<> tp2.DisplayName)))then
661-
660+
r.DisplayName<> tp2.DisplayName)))
661+
then
662662
// NOTE: we grab the name eagerly to make sure the type variable prints as a type variable
663663
lettpnmOpt=if r.IsCompilerGeneratedthen Noneelse Some r.Name
664-
WarnD(NonRigidTypar(denv,tpnmOpt,r.Range,ty1,ty,csenv.m))
664+
WarnD(NonRigidTypar(denv,tpnmOpt,r.Range,ty1,ty,csenv.m))
665665
else
666666
CompleteD
667667

@@ -888,7 +888,7 @@ and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra
888888
// may feasibly convert to Head.
889889

890890
else
891-
match(FindUniqueFeasibleSupertype g amap m ty1 ty2)with
891+
match FindUniqueFeasibleSupertype g amap m ty1 ty2with
892892
| None-> ErrorD(ConstraintSolverTypesNotInSubsumptionRelation(denv,ty1,ty2,m,m2))
893893
| Some t-> SolveTypSubsumesTyp csenv ndeep m2 trace cxsln ty1 t
894894

@@ -911,7 +911,7 @@ and SolveTyparSubtypeOfType (csenv:ConstraintSolverEnv) ndeep m2 trace tp ty1 =
911911
elif isSealedTy g ty1then
912912
SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace(mkTyparTy tp) ty1
913913
else
914-
AddConstraint csenv ndeep m2 trace tp(TyparConstraint.CoercesTo(ty1,m))
914+
AddConstraint csenv ndeep m2 trace tp(TyparConstraint.CoercesTo(ty1,m))
915915

916916
andDepthCheck ndeep m=
917917
if ndeep>300then error(Error(FSComp.SR.csTypeInferenceMaxDepth(),m))else CompleteD
@@ -1263,7 +1263,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p
12631263
match recdPropSearch, methOverloadResultwith
12641264
| Some(rfinfo, isSetProp), None->
12651265
// OK, the constraint is solved by a record property. Assert that the return types match.
1266-
letrty2=if isSetProptheng.unit_tyelse rfinfo.FieldType
1266+
letrty2=if isSetPropthen g.unit_tyelse rfinfo.FieldType
12671267
SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2++(fun()->
12681268
ResultD(TTraitSolvedRecdProp(rfinfo, isSetProp)))
12691269
| None, Some(calledMeth:CalledMeth<_>)->

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp