From 6ff66fcbd70c7d588bbf6e3b2cd41aa7d8a62fd2 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Mon, 30 Jan 2023 21:22:02 +0000 Subject: lib: standardise attrset type syntax There are a number of different syntaxes used for attrset type signatures in our doc strings, this change standardises upon one that uses :: for specifying attribute type, and ; terminators to be consistent with nix syntax. There are no bugs in the functions themselves, just that different syntaxes may confuse new users. --- lib/lists.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/lists.nix') diff --git a/lib/lists.nix b/lib/lists.nix index 8b2c2d12801bb..9f69485b40862 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -306,7 +306,7 @@ rec { /* Splits the elements of a list in two lists, `right` and `wrong`, depending on the evaluation of a predicate. - Type: (a -> bool) -> [a] -> { right :: [a], wrong :: [a] } + Type: (a -> bool) -> [a] -> { right :: [a]; wrong :: [a]; } Example: partition (x: x > 2) [ 5 1 2 3 4 ] @@ -374,7 +374,7 @@ rec { /* Merges two lists of the same size together. If the sizes aren't the same the merging stops at the shortest. - Type: zipLists :: [a] -> [b] -> [{ fst :: a, snd :: b}] + Type: zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }] Example: zipLists [ 1 2 ] [ "a" "b" ] -- cgit 1.4.1