You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Their exact supertype and implementation can be consulted in the [function classes section](./12-the-scala-standard-library.md#the-function-classes) of the standard library page in this document.
In the concrete syntax of types, refinements can contain several refined declarations.
1174
+
Moreover, the refined declarations can refer to each other as well as to members of the parent type, i.e., they have access to `this`.
1175
+
1176
+
In the abstract syntax of types, each refinement defines exactly one refined declaration, and references to `this` must be made explicit in a recursive type.
1177
+
1178
+
The conversion from the concrete syntax to the abstract syntax works as follows:
1179
+
1180
+
1. Create a fresh recursive this name ´\alpha´.
1181
+
2. Replace every implicit or explicit reference to `this` in the refinement declarations by ´\alpha´.
1182
+
3. Create nested [refined types](#refined-types), one for every refined declaration.
1183
+
4. Unless ´\alpha´ was never actually used, wrap the result in a [recursive type](#recursive-types)`{ ´\alpha´ => ´...´ }`.
0 commit comments