@@ -155,21 +155,21 @@ type ContextInfo =
155155 /// The type equation comes from a sequence expression.
156156 | SequenceExpression of TType
157157
158- exception ConstraintSolverTupleDiffLengths of DisplayEnv * TType list * TType list * range * range
159- exception ConstraintSolverInfiniteTypes of ContextInfo * DisplayEnv * TType * TType * range * range
160- exception ConstraintSolverTypesNotInEqualityRelation of DisplayEnv * TType * TType * range * range * ContextInfo
161- exception ConstraintSolverTypesNotInSubsumptionRelation of DisplayEnv * TType * TType * range * range
162- exception ConstraintSolverMissingConstraint of DisplayEnv * Tast.Typar * Tast.TyparConstraint * range * range
163- exception ConstraintSolverError of string * range * range
164- exception ConstraintSolverRelatedInformation of string option * range * exn
165-
166- exception ErrorFromApplyingDefault of TcGlobals * DisplayEnv * Tast.Typar * TType * exn * range
167- exception ErrorFromAddingTypeEquation of TcGlobals * DisplayEnv * TType * TType * exn * range
168- exception ErrorsFromAddingSubsumptionConstraint of TcGlobals * DisplayEnv * TType * TType * exn * ContextInfo * range
169- exception ErrorFromAddingConstraint of DisplayEnv * exn * range
170- exception PossibleOverload of DisplayEnv * string * exn * range
171- exception UnresolvedOverloading of DisplayEnv * exn list * string * range
172- exception UnresolvedConversionOperator of DisplayEnv * TType * TType * range
158+ exception ConstraintSolverTupleDiffLengths of displayEnv : DisplayEnv * TType list * TType list * range * range
159+ exception ConstraintSolverInfiniteTypes of displayEnv : DisplayEnv * contextInfo : ContextInfo * TType * TType * range * range
160+ exception ConstraintSolverTypesNotInEqualityRelation of displayEnv : DisplayEnv * TType * TType * range * range * ContextInfo
161+ exception ConstraintSolverTypesNotInSubsumptionRelation of displayEnv : DisplayEnv * TType * TType * range * range
162+ exception ConstraintSolverMissingConstraint of displayEnv : DisplayEnv * Tast.Typar * Tast.TyparConstraint * range * range
163+ exception ConstraintSolverError of string * range * range
164+ exception ConstraintSolverRelatedInformation of string option * range * exn
165+
166+ exception ErrorFromApplyingDefault of tcGlobals : TcGlobals * displayEnv : DisplayEnv * Tast.Typar * TType * exn * range
167+ exception ErrorFromAddingTypeEquation of tcGlobals : TcGlobals * displayEnv : DisplayEnv * TType * TType * exn * range
168+ exception ErrorsFromAddingSubsumptionConstraint of tcGlobals : TcGlobals * displayEnv : DisplayEnv * TType * TType * exn * ContextInfo * range
169+ exception ErrorFromAddingConstraint of displayEnv : DisplayEnv * exn * range
170+ exception PossibleOverload of displayEnv : DisplayEnv * string * exn * range
171+ exception UnresolvedOverloading of displayEnv : DisplayEnv * exn list * string * range
172+ exception UnresolvedConversionOperator of displayEnv : DisplayEnv * TType * TType * range
173173
174174let GetPossibleOverloads amap m denv ( calledMethGroup : ( CalledMeth < _ > * exn ) list ) =
175175 calledMethGroup |> List.map ( fun ( cmeth , e ) -> PossibleOverload( denv, NicePrint.stringOfMethInfo amap m denv cmeth.Method, e, m))
@@ -385,7 +385,7 @@ let ShowAccessDomain ad =
385385//-------------------------------------------------------------------------
386386// Solve
387387
388- exception NonRigidTypar of DisplayEnv * string option * range * TType * TType * range
388+ exception NonRigidTypar of displayEnv : DisplayEnv * string option * range * TType * TType * range
389389exception LocallyAbortOperationThatFailsToResolveOverload
390390exception LocallyAbortOperationThatLosesAbbrevs
391391let localAbortD = ErrorD LocallyAbortOperationThatLosesAbbrevs
@@ -724,7 +724,7 @@ let rec SolveTyparEqualsType (csenv: ConstraintSolverEnv) ndeep m2 (trace: Optio
724724 // The types may still be equivalent due to abbreviations, which we are trying not to eliminate
725725 if typeEquiv csenv.g ty1 ty then () else
726726 // The famous 'occursCheck' check to catch "infinite types" like 'a = list<'a> - see also https://github.com/Microsoft/visualfsharp/issues/1170
727- if occursCheck csenv.g r ty then return ! ErrorD ( ConstraintSolverInfiniteTypes( csenv.eContextInfo , csenv.DisplayEnv , ty1, ty, m, m2)) else
727+ if occursCheck csenv.g r ty then return ! ErrorD ( ConstraintSolverInfiniteTypes( csenv.DisplayEnv , csenv.eContextInfo , ty1, ty, m, m2)) else
728728 // Note: warn _and_ continue!
729729 do ! CheckWarnIfRigid csenv ty1 r ty
730730 // Record the solution before we solve the constraints, since
0 commit comments