nixos/doc: Document types.unique
This commit is contained in:
parent
8691ab3d47
commit
48dbe26229
|
@ -250,6 +250,12 @@ Composed types are types that take a type as parameter. `listOf
|
|||
: Ensures that type *`t`* cannot be merged. It is used to ensure option
|
||||
definitions are declared only once.
|
||||
|
||||
`types.unique` `{ message = m }` *`t`*
|
||||
|
||||
: Ensures that type *`t`* cannot be merged. Prints the message *`m`*, after
|
||||
the line `The option <option path> is defined multiple times.` and before
|
||||
a list of definition locations.
|
||||
|
||||
`types.either` *`t1 t2`*
|
||||
|
||||
: Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
|
||||
|
|
|
@ -496,6 +496,22 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.unique</literal>
|
||||
<literal>{ message = m }</literal>
|
||||
<emphasis><literal>t</literal></emphasis>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ensures that type <emphasis><literal>t</literal></emphasis>
|
||||
cannot be merged. Prints the message
|
||||
<emphasis><literal>m</literal></emphasis>, after the line
|
||||
<literal>The option <option path> is defined multiple times.</literal>
|
||||
and before a list of definition locations.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<literal>types.either</literal>
|
||||
|
|
Loading…
Reference in a new issue