diff options
Diffstat (limited to 'doc/manual/generate-builtins.nix')
-rw-r--r-- | doc/manual/generate-builtins.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/manual/generate-builtins.nix b/doc/manual/generate-builtins.nix new file mode 100644 index 000000000..92c7b1a31 --- /dev/null +++ b/doc/manual/generate-builtins.nix @@ -0,0 +1,16 @@ +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)) |