attrsets: clarify that mapAttrs maps over *leaf* attrs#212189
Conversation
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
|
@roberth, related to your suggestion, it appears that we do not have any kind of Is there a reason it was omitted? Everybody who needs it seems to write their own recursion. |
|
I think that's correct. It may have to do with the lack of static or nominal types, which means that we can't consistently distinguish between an attrset that's part of a tree structure and an attrset that represents something else. We do have those predicate functions (
In a language like Haskell, recursion schemes are kind of nice, but Nix is a different language, where different things are useful, and different things are idiomatic. You could write a library that represents trees in a safe way, supporting a nice function like |
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes