File tree 2 files changed +14
-2
lines changed
nixos/doc/manual/development
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 92
92
} ;
93
93
94
94
95
+ # When adding new types don't forget to document them in
96
+ # nixos/doc/manual/development/option-types.xml!
95
97
types = rec {
96
98
97
99
unspecified = mkOptionType {
Original file line number Diff line number Diff line change 68
68
69
69
<section ><title >Value Types</title >
70
70
71
- <para >Value types are type that take a value parameter. The only value type
72
- in the library is <literal >enum</literal >.</para >
71
+ <para >Value types are type that take a value parameter.</para >
73
72
74
73
<variablelist >
75
74
<varlistentry >
141
140
str</literal >. Multiple definitions cannot be
142
141
merged.</para ></listitem >
143
142
</varlistentry >
143
+ <varlistentry >
144
+ <term ><varname >types.coercedTo</varname > <replaceable >from</replaceable >
145
+ <replaceable >f</replaceable > <replaceable >to</replaceable ></term >
146
+ <listitem ><para >Type <replaceable >to</replaceable > or type
147
+ <replaceable >from</replaceable > which will be coerced to
148
+ type <replaceable >to</replaceable > using function
149
+ <replaceable >f</replaceable > which takes an argument of type
150
+ <replaceable >from</replaceable > and return a value of type
151
+ <replaceable >to</replaceable >. Can be used to preserve backwards
152
+ compatibility of an option if its type was changed.</para ></listitem >
153
+ </varlistentry >
144
154
</variablelist >
145
155
146
156
</section >
You can’t perform that action at this time.
1 commit comments
Profpatsch commentedon May 24, 2017
Looks good!