@@ -793,8 +793,8 @@ let UnifyFunctionType extraInfo cenv denv mFunExpr ty =
793793 | None -> error (FunctionExpected(denv, ty, mFunExpr))
794794
795795let ReportImplicitlyIgnoredBoolExpression denv m ty expr =
796- let checkExpr mexprOpt =
797- matchexprOpt with
796+ let checkExpr mexpr =
797+ matchexpr with
798798 | Expr.App(Expr.Val(vf, _, _), _, _, exprs, _) when vf.LogicalName = opNameEquals ->
799799 match exprs with
800800 | Expr.App(Expr.Val(propRef, _, _), _, _, Expr.Val(vf, _, _) :: _, _) :: _ ->
@@ -821,17 +821,16 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr =
821821 | _ -> UnitTypeExpected (denv, ty, m)
822822
823823 match expr with
824- |Some( Expr.Let(_, Expr.Sequential(_, inner, _, _, _), _, _) )
825- |Some( Expr.Sequential(_, inner, _, _, _) ) ->
824+ | Expr.Let(_, Expr.Sequential(_, inner, _, _, _), _, _)
825+ | Expr.Sequential(_, inner, _, _, _) ->
826826 let rec extractNext expr =
827827 match expr with
828828 | Expr.Sequential(_, inner, _, _, _) -> extractNext inner
829829 | _ -> checkExpr expr.Range expr
830830 extractNext inner
831- | Some expr -> checkExpr m expr
832- | _ -> UnitTypeExpected (denv, ty, m)
831+ | expr -> checkExpr m expr
833832
834- let UnifyUnitType cenv denv m tyexprOpt =
833+ let UnifyUnitType cenv denv m tyexpr =
835834 if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty cenv.g.unit_ty then
836835 true
837836 else
@@ -843,7 +842,7 @@ let UnifyUnitType cenv denv m ty exprOpt =
843842 if not (typeEquiv cenv.g cenv.g.bool_ty ty) then
844843 warning (UnitTypeExpected (denv, ty, m))
845844 else
846- warning (ReportImplicitlyIgnoredBoolExpression denv m tyexprOpt )
845+ warning (ReportImplicitlyIgnoredBoolExpression denv m tyexpr )
847846 false
848847
849848//-------------------------------------------------------------------------
@@ -5568,7 +5567,7 @@ and TcStmtThatCantBeCtorBody cenv env tpenv expr =
55685567and TcStmt cenv env tpenv synExpr =
55695568 let expr, ty, tpenv = TcExprOfUnknownType cenv env tpenv synExpr
55705569 let m = synExpr.Range
5571- let wasUnit = UnifyUnitType cenv env.DisplayEnv m ty(Some expr)
5570+ let wasUnit = UnifyUnitType cenv env.DisplayEnv m ty expr
55725571 if wasUnit then
55735572 expr, tpenv
55745573 else
@@ -10414,7 +10413,7 @@ and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt
1041410413 else TcExprThatCantBeCtorBody cenv overallExprTy envinner tpenv rhsExpr)
1041510414
1041610415 if bkind = StandaloneExpression && not cenv.isScript then
10417- UnifyUnitType cenv env.DisplayEnv mBinding overallPatTy(Some rhsExprChecked) |> ignore<bool>
10416+ UnifyUnitType cenv env.DisplayEnv mBinding overallPatTy rhsExprChecked |> ignore<bool>
1041810417
1041910418 // Fix up the r.h.s. expression for 'fixed'
1042010419 let rhsExprChecked =