@@ -3383,17 +3383,10 @@ User-defined types have limited capabilities.
3383
3383
3384
3384
The primitive types are the following:
3385
3385
3386
- * The "unit" type ` () ` , having the single "unit" value ` () ` (occasionally called
3387
- "nil"). [ ^ unittype ]
3388
3386
* The boolean type ` bool ` with values ` true ` and ` false ` .
3389
3387
* The machine types.
3390
3388
* The machine-dependent integer and floating-point types.
3391
3389
3392
- [ ^ unittype ] : The "unit" value ` () ` is * not* a sentinel "null pointer" value for
3393
- reference variables; the "unit" type is the implicit return type from functions
3394
- otherwise lacking a return type, and can be used in other contexts (such as
3395
- message-sending or type-parametric code) as a zero-size type.]
3396
-
3397
3390
#### Machine types
3398
3391
3399
3392
The machine types are the following:
@@ -3444,6 +3437,14 @@ of the tuple. It has no nominal name and is instead structurally typed.
3444
3437
Tuple types and values are denoted by listing the types or values of their
3445
3438
elements, respectively, in a parenthesized, comma-separated list.
3446
3439
3440
+ The empty tuple is the "unit" type ` () ` , having the single value ` () `
3441
+ (occasionally called "nil"). [ ^ unittype ]
3442
+
3443
+ [ ^ unittype ] : The "unit" value ` () ` is * not* a sentinel "null pointer" value for
3444
+ reference variables; the "unit" type is the implicit return type from functions
3445
+ otherwise lacking a return type, and can be used in other contexts (such as
3446
+ message-sending or type-parametric code) as a zero-size type.]
3447
+
3447
3448
Because tuple elements don't have a name, they can only be accessed by
3448
3449
pattern-matching or by using ` N ` directly as a field to access the
3449
3450
` N ` th element.
0 commit comments