From 850f3ce7d10b0595835b607814c1368f5ee7f085 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Sat, 29 Nov 2025 19:33:29 +0100 Subject: [PATCH] docs/lib/trivial: Use Type heading used in basically every other function documentation --- lib/trivial.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/trivial.nix b/lib/trivial.nix index 59dc0b0af929..9edb1e862383 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -263,7 +263,11 @@ in /** Merge two attribute sets shallowly, right side trumps left + # Type + + ``` mergeAttrs :: attrs -> attrs -> attrs + ``` # Inputs @@ -988,12 +992,17 @@ in The metadata should match the format given by builtins.functionArgs, i.e. a set from expected argument to a bool representing whether that argument has a default or not. - setFunctionArgs : (a → b) → Map String Bool → (a → b) This function is necessary because you can't dynamically create a function of the `{ a, b ? foo, ... }:` format, but some facilities like `callPackage` expect to be able to query expected arguments. + # Type + + ``` + setFunctionArgs : (a -> b) -> Map String Bool -> (a -> b) + ``` + # Inputs `f` @@ -1015,7 +1024,12 @@ in This works both with nix-native `{ a, b ? foo, ... }:` style functions and functions with args set with `setFunctionArgs`. It has the same return type and semantics as `builtins.functionArgs`. - setFunctionArgs : (a → b) → Map String Bool. + + # Type + + ``` + functionArgs : (a -> b) -> Map String Bool + ``` # Inputs