@@ -12,16 +12,16 @@ open FSharp.Compiler.Xml
1212
1313exception ParameterlessStructCtor of range : range
1414
15- /// Typechecked info for implicit constructor and it's arguments
16- type IncrClassCtorLhs =
15+ /// Typechecked info for implicit constructor and it's arguments
16+ type IncrClassCtorLhs =
1717 {
1818 /// The TyconRef for the type being defined
1919 TyconRef: TyconRef
2020
21- /// The type parameters allocated for the implicit instance constructor.
22- /// These may be equated with other (WillBeRigid) type parameters through equi-recursive inference, and so
21+ /// The type parameters allocated for the implicit instance constructor.
22+ /// These may be equated with other (WillBeRigid) type parameters through equi-recursive inference, and so
2323 /// should always be renormalized/canonicalized when used.
24- InstanceCtorDeclaredTypars: Typars
24+ InstanceCtorDeclaredTypars: Typars
2525
2626 /// The value representing the static implicit constructor.
2727 /// Lazy to ensure the static ctor value is only published if needed.
@@ -32,7 +32,7 @@ type IncrClassCtorLhs =
3232
3333 /// The type of the implicit constructor, representing as a ValScheme.
3434 InstanceCtorValScheme: ValScheme
35-
35+
3636 /// The values representing the arguments to the implicit constructor.
3737 InstanceCtorArgs: Val list
3838
@@ -54,84 +54,84 @@ type IncrClassCtorLhs =
5454 }
5555
5656/// Indicates how is a 'let' bound value in a class with implicit construction is represented in
57- /// the TAST ultimately produced by type checking.
58- type IncrClassValRepr =
57+ /// the TAST ultimately produced by type checking.
58+ type IncrClassValRepr =
5959
6060 // e.g representation for 'let v = 3' if it is not used in anything given a method representation
61- | InVar of isArg : bool
61+ | InVar of isArg : bool
6262
6363 // e.g representation for 'let v = 3'
6464 | InField of isStatic : bool * staticCountForSafeInit : int * fieldRef : RecdFieldRef
6565
6666 // e.g representation for 'let f x = 3'
67- | InMethod of isStatic : bool * value : Val * valReprInfo : ValReprInfo
67+ | InMethod of isStatic : bool * value : Val * valReprInfo : ValReprInfo
6868
6969/// IncrClassReprInfo represents the decisions we make about the representation of 'let' and 'do' bindings in a
7070/// type defined with implicit class construction.
71- type IncrClassReprInfo =
72- {
71+ type IncrClassReprInfo =
72+ {
7373 /// Indicates the set of field names taken within one incremental class
7474 TakenFieldNames: Set < string >
75-
75+
7676 RepInfoTcGlobals: TcGlobals
77-
77+
7878 /// vals mapped to representations
79- ValReprs: Zmap < Val , IncrClassValRepr >
80-
81- /// vals represented as fields or members from this point on
82- ValsWithRepresentation: Zset < Val >
79+ ValReprs: Zmap < Val , IncrClassValRepr >
80+
81+ /// vals represented as fields or members from this point on
82+ ValsWithRepresentation: Zset < Val >
8383 }
8484
8585 static member IsMethodRepr : cenv : TcFileState -> bind : Binding -> bool
8686
87- // Publish the fields of the representation to the type
88- member PublishIncrClassFields :
89- cenv : TcFileState *
90- denv : DisplayEnv *
91- cpath : CompilationPath *
92- ctorInfo : IncrClassCtorLhs *
93- safeStaticInitInfo : SafeInitData
94- -> unit
87+ // Publish the fields of the representation to the type
88+ member PublishIncrClassFields :
89+ cenv : TcFileState *
90+ denv : DisplayEnv *
91+ cpath : CompilationPath *
92+ ctorInfo : IncrClassCtorLhs *
93+ safeStaticInitInfo : SafeInitData ->
94+ unit
9595
9696 /// Given localRep saying how locals have been represented , e.g. as fields.
9797 /// Given an expr under a given thisVal context.
98- member FixupIncrClassExprPhase2C :
99- cenv : TcFileState ->
100- thisValOpt : Val option ->
101- safeStaticInitInfo : SafeInitData ->
102- thisTyInst : TypeInst ->
103- expr : Expr ->
104- Expr
98+ member FixupIncrClassExprPhase2C :
99+ cenv : TcFileState ->
100+ thisValOpt : Val option ->
101+ safeStaticInitInfo : SafeInitData ->
102+ thisTyInst : TypeInst ->
103+ expr : Expr ->
104+ Expr
105105
106106/// Represents a single group of bindings in a class with an implicit constructor
107- type IncrClassBindingGroup =
108- | IncrClassBindingGroup of bindings : Binding list * isStatic : bool * isRecursive : bool
109- | IncrClassDo of expr : Expr * isStatic : bool * range : Range
107+ type IncrClassBindingGroup =
108+ | IncrClassBindingGroup of bindings : Binding list * isStatic : bool * isRecursive : bool
109+ | IncrClassDo of expr : Expr * isStatic : bool * range : Range
110110
111111type IncrClassConstructionBindingsPhase2C =
112112 | Phase2CBindings of IncrClassBindingGroup list
113- | Phase2CCtorJustAfterSuperInit
113+ | Phase2CCtorJustAfterSuperInit
114114 | Phase2CCtorJustAfterLastLet
115115
116- /// Check and elaborate the "left hand side" of the implicit class construction
116+ /// Check and elaborate the "left hand side" of the implicit class construction
117117/// syntax.
118- val TcImplicitCtorLhs_Phase2A :
119- cenv: TcFileState *
120- env: TcEnv *
121- tpenv: UnscopedTyparEnv *
122- tcref: TyconRef *
123- vis: SynAccess option *
124- attrs : SynAttribute list *
125- spats : SynSimplePat list *
126- thisIdOpt : Ident option *
127- baseValOpt: Val option *
128- safeInitInfo : SafeInitData *
129- m : range *
130- copyOfTyconTypars : Typar list *
131- objTy : TType *
132- thisTy : TType *
133- xmlDoc: PreXmlDoc
134- -> IncrClassCtorLhs
118+ val TcImplicitCtorLhs_Phase2A :
119+ cenv: TcFileState *
120+ env: TcEnv *
121+ tpenv: UnscopedTyparEnv *
122+ tcref: TyconRef *
123+ vis: SynAccess option *
124+ attrs: SynAttribute list *
125+ spats: SynSimplePat list *
126+ thisIdOpt: Ident option *
127+ baseValOpt: Val option *
128+ safeInitInfo: SafeInitData *
129+ m: range *
130+ copyOfTyconTypars: Typar list *
131+ objTy: TType *
132+ thisTy: TType *
133+ xmlDoc: PreXmlDoc ->
134+ IncrClassCtorLhs
135135
136136/// <summary>
137137/// Given a set of 'let' bindings (static or not, recursive or not) that make up a class,
@@ -150,9 +150,10 @@ val MakeCtorForIncrClassConstructionPhase2C:
150150 cenv: TcFileState *
151151 env: TcEnv *
152152 ctorInfo: IncrClassCtorLhs *
153- inheritsExpr : Expr *
154- inheritsIsVisible : bool *
153+ inheritsExpr: Expr *
154+ inheritsIsVisible: bool *
155155 decs: IncrClassConstructionBindingsPhase2C list *
156156 memberBinds: Binding list *
157- generalizedTyparsForRecursiveBlock : Typar list *
158- safeStaticInitInfo: SafeInitData -> Expr * Expr option * Binding list * IncrClassReprInfo
157+ generalizedTyparsForRecursiveBlock: Typar list *
158+ safeStaticInitInfo: SafeInitData ->
159+ Expr * Expr option * Binding list * IncrClassReprInfo
0 commit comments