Skip to content

Commit fa0a889

Browse files
committed
fixes to integration
1 parent 909adb8 commit fa0a889

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

src/absil/il.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4276,7 +4276,7 @@ let rec unscopeILTypeSpecQuick (tspec:ILTypeSpec) =
42764276
let tref = tspec.TypeRef
42774277
let tinst = tspec.GenericArgs
42784278
let qtref = qunscope_tref tref
4279-
if ILList.isEmpty tinst && isNone qtref then
4279+
if ILList.isEmpty tinst && Option.isNone qtref then
42804280
None (* avoid reallocation in the common case *)
42814281
else
42824282
match qtref with

src/fsharp/ast.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ and
424424

425425
/// F# syntax : struct (type * ... * type)
426426
// the bool is true if / rather than * follows the type
427-
| StructTuple of (bool*SynType) list * range
427+
| StructTuple of (bool*SynType) list * range:range
428428

429429
/// F# syntax : type[]
430430
| Array of int * elementType:SynType * range:range
@@ -496,7 +496,7 @@ and
496496
| Tuple of exprs:SynExpr list * commaRanges:range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them
497497

498498
/// F# syntax: struct (e1, ..., eN)
499-
| StructTuple of SynExpr list * range list * range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them
499+
| StructTuple of SynExpr list * range list * range:range // "range list" is for interstitial commas, these only matter for parsing/design-time tooling, the typechecker may munge/discard them
500500

501501
/// F# syntax: [ e1; ...; en ], [| e1; ...; en |]
502502
| ArrayOrList of isList:bool * exprs:SynExpr list * range:range

src/fsharp/fsi/fsi.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ type internal FsiValuePrinter(fsi: FsiEvaluationSessionHostConfig, ilGlobals, ge
378378
let lay = valuePrinter.PrintValue (FsiValuePrinterMode.PrintExpr, opts, obj, objTy)
379379
if isEmptyL lay then None else Some lay // suppress empty layout
380380
let denv = { denv with suppressMutableKeyword = true } // suppress 'mutable' in 'val mutable it = ...'
381-
let fullL = if isNone rhsL || isEmptyL rhsL.Value then
381+
let fullL = if Option.isNone rhsL || isEmptyL rhsL.Value then
382382
NicePrint.layoutValOrMember denv vref (* the rhs was suppressed by the printer, so no value to print *)
383383
else
384384
(NicePrint.layoutValOrMember denv vref ++ wordL "=") --- rhsL.Value

src/fsharp/vs/Exprs.fs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ open Internal.Utilities
1818
[<AutoOpen>]
1919
module ExprTranslationImpl =
2020

21+
let nonNil x = not (List.isEmpty x)
22+
2123
type ExprTranslationEnv =
2224
{ //Map from Val to binding index
2325
vs: ValMap<unit>;
@@ -329,7 +331,7 @@ module FSharpExprConvert =
329331
// Check to see if there aren't enough arguments or if there is a tuple-arity mismatch
330332
// If so, adjust and try again
331333
if curriedArgs.Length < curriedArgInfos.Length ||
332-
((List.take curriedArgInfos.Length curriedArgs,curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestTuple arg).Length))) then
334+
((List.take curriedArgInfos.Length curriedArgs,curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestRefTupleExpr arg).Length))) then
333335

334336
// Too few arguments or incorrect tupling? Convert to a lambda and beta-reduce the
335337
// partially applied arguments to 'let' bindings
@@ -352,7 +354,7 @@ module FSharpExprConvert =
352354
let numUntupledArgs = curriedArgInfo.Length
353355
(if numUntupledArgs = 0 then []
354356
elif numUntupledArgs = 1 then [arg]
355-
else tryDestTuple arg))
357+
else tryDestRefTupleExpr arg))
356358

357359
let contf2 =
358360
match laterArgs with
@@ -417,7 +419,7 @@ module FSharpExprConvert =
417419
E.LetRec(FlatList.toList bindsR,bodyR)
418420

419421
| Expr.Lambda(_,_,_,vs,b,_,_) ->
420-
let v,b = MultiLambdaToTupledLambda vs b
422+
let v,b = MultiLambdaToTupledLambda cenv.g vs b
421423
let vR = ConvVal cenv v
422424
let bR = ConvExpr cenv (env.BindVal v) b
423425
E.Lambda(vR, bR)
@@ -466,8 +468,8 @@ module FSharpExprConvert =
466468
let argsR = ConvExprs cenv env args
467469
E.NewUnionCase(typR, mkR, argsR)
468470

469-
| TOp.Tuple,tyargs,_ ->
470-
let tyR = ConvType cenv (mkTupledTy cenv.g tyargs)
471+
| TOp.Tuple tupInfo,tyargs,_ ->
472+
let tyR = ConvType cenv (mkAnyTupledTy cenv.g tupInfo tyargs)
471473
let argsR = ConvExprs cenv env args
472474
E.NewTuple(tyR, argsR)
473475

@@ -502,8 +504,8 @@ module FSharpExprConvert =
502504
let typR = ConvType cenv (mkAppTy rfref.TyconRef tyargs)
503505
E.FSharpFieldGet(Some objR, typR, projR)
504506

505-
| TOp.TupleFieldGet(n),tyargs,[e] ->
506-
let tyR = ConvType cenv (mkTupledTy cenv.g tyargs)
507+
| TOp.TupleFieldGet(tupInfo,n),tyargs,[e] ->
508+
let tyR = ConvType cenv (mkAnyTupledTy cenv.g tupInfo tyargs)
507509
E.TupleGet(tyR, n, ConvExpr cenv env e)
508510

509511
| TOp.ILAsm([ I_ldfld(_,_,fspec) ],_), enclTypeArgs, [obj] ->
@@ -679,7 +681,7 @@ module FSharpExprConvert =
679681
let envinner = env.BindVal v
680682
Some(vR,rhsR),envinner
681683

682-
and ConvILCall cenv env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) =
684+
and ConvILCall (cenv:Impl.cenv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) =
683685
let isNewObj = (isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false))
684686
let methName = ilMethRef.Name
685687
let isPropGet = methName.StartsWith("get_",System.StringComparison.Ordinal)
@@ -863,7 +865,7 @@ module FSharpExprConvert =
863865
| Some ty -> ty
864866

865867
let linkageType =
866-
let ty = mkIteratedFunTy (List.map (mkTupledTy cenv.g) argtys) rty
868+
let ty = mkIteratedFunTy (List.map (mkRefTupledTy cenv.g) argtys) rty
867869
let ty = if isStatic then ty else mkFunTy enclosingType ty
868870
tryMkForallTy (typars1 @ typars2) ty
869871

src/fsharp/vs/Symbols.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ and FSharpType(cenv, typ:TType) =
18691869
| TType_var tp -> 10100 + int32 tp.Stamp
18701870
| TType_app (tc1,b1) -> 10200 + int32 tc1.Stamp + List.sumBy hashType b1
18711871
| TType_ucase _ -> 10300 // shouldn't occur in symbols
1872-
| TType_tuple l1 -> 10400 + List.sumBy hashType l1
1872+
| TType_tuple (_,l1) -> 10400 + List.sumBy hashType l1
18731873
| TType_fun (dty,rty) -> 10500 + hashType dty + hashType rty
18741874
| TType_measure _ -> 10600
18751875
hashType typ

0 commit comments

Comments
 (0)