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-04-04 11:47:36 +0200
committerRobert Hensing <robert@roberthensing.nl>2024-04-04 12:00:54 +0200
commitf354686536823a0bedb95abf13b090b961485bf9 (patch)
tree70c3f9888c639219a98a965e5514b7b97f54e3b9 /nixos/doc/manual/development/option-types.section.md
parent2d791b5f7b6575f2153f5971a2046bec15f637f7 (diff)
doc/option-types: Update sum types
Diffstat (limited to 'nixos/doc/manual/development/option-types.section.md')
-rw-r--r--nixos/doc/manual/development/option-types.section.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md
index 0b348094bfcfb..5ed55f53aec0e 100644
--- a/nixos/doc/manual/development/option-types.section.md
+++ b/nixos/doc/manual/development/option-types.section.md
@@ -307,16 +307,15 @@ If some values are instances of more than one of the types, it is not possible t
 
 ## Sum types {#sec-option-types-sums}
 
-A sum type can be thought of, conceptually, as a *`types.enum`* where each valid item is paired with a type, through some value syntax.
+A sum type can be thought of, conceptually, as a *`types.enum`* where each valid item is paired with at least a type, through some value syntax.
 Nix does not have a built-in syntax for this pairing of a label and a type or value, so sum types may be represented in multiple ways.
 
-If the built-in Nix value types provide enough distinction, you simplify your syntax with a [union type](#sec-option-types-unions) instead.
+If the you're interested in can be distinguished without a label, you may simplify your value syntax with a [union type](#sec-option-types-unions) instead.
 
-`types.attrTag` *`{ attr1 = t1; attr2 = t2; ... }`*
+`types.attrTag` *`{ attr1 = option1; attr2 = option2; ... }`*
 
 :   An attribute set containing one attribute, whose name must be picked from
-    the attribute set (`attr1`, etc) and whose value must be of the accompanying
-    type.
+    the attribute set (`attr1`, etc) and whose value consists of definitions that are valid for the corresponding option (`option1`, etc).
 
     This type appears in the documentation as _attribute-tagged union_.