Nix/doc/manual/generate-builtins.nix
Alyssa Ross 5f07f2ff2b
doc: builtins: use a definition list
This looks a lot better (and is also more semantically meaningful).

Since this list is generated in a Nix expression, I don't think using
HTML here is going to be the thing that puts people off modifying this
part of the documentation!
2021-05-05 14:34:46 +00:00

17 lines
315 B
Nix

with builtins;
with import ./utils.nix;
builtins:
concatStrings (map
(name:
let builtin = builtins.${name}; in
"<dt><code>${name} "
+ concatStringsSep " " (map (s: "<var>${s}</var>") builtin.args)
+ "</code></dt>"
+ "<dd>\n\n"
+ builtin.doc
+ "\n\n</dd>"
)
(attrNames builtins))