about summary refs log tree commit diff
path: root/nixos/doc/manual/development/option-types.section.md
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2024-01-28 16:24:27 +0100
committerRobert Hensing <robert@roberthensing.nl>2024-02-11 18:45:15 +0100
commit2ceb5558f95f978f1df70a2873b0fdf6ee87ff9f (patch)
tree37eefabe53517a1318c4aabeb7d57cd129069ae7 /nixos/doc/manual/development/option-types.section.md
parent0feea2dbd2eb76ffa1ba1db7d291bcb1a274d529 (diff)
doc/option-types: Move either and oneOf to Union types
Diffstat (limited to 'nixos/doc/manual/development/option-types.section.md')
-rw-r--r--nixos/doc/manual/development/option-types.section.md21
1 files changed, 10 insertions, 11 deletions
diff --git a/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md
index e656a1002f5af..8dde0aba4b2b7 100644
--- a/nixos/doc/manual/development/option-types.section.md
+++ b/nixos/doc/manual/development/option-types.section.md
@@ -288,6 +288,16 @@ A union of types is a type such that a value is valid when it is valid for at le
 
 If some values are instances of more than one of the types, it is not possible to distinguish which type they are meant to be instances of. If that's needed, consider using a [sum type](#sec-option-types-sums).
 
+`types.either` *`t1 t2`*
+
+:   Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
+    Multiple definitions cannot be merged.
+
+`types.oneOf` \[ *`t1 t2`* ... \]
+
+:   Type *`t1`* or type *`t2`* and so forth, e.g.
+    `with types; oneOf [ int str bool ]`. Multiple definitions cannot be
+    merged.
 
 
 ## Sum types {#sec-option-types-sums}
@@ -365,17 +375,6 @@ Composed types are types that take a type as parameter. `listOf
     `attrTag` can be thought of as an extension of *`enum`* where the permissible items
     are attribute names, and each item is paired with a value of a specific type.
 
-`types.either` *`t1 t2`*
-
-:   Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
-    Multiple definitions cannot be merged.
-
-`types.oneOf` \[ *`t1 t2`* ... \]
-
-:   Type *`t1`* or type *`t2`* and so forth, e.g.
-    `with types; oneOf [ int str bool ]`. Multiple definitions cannot be
-    merged.
-
 `types.coercedTo` *`from f to`*
 
 :   Type *`to`* or type *`from`* which will be coerced to type *`to`* using