Get rid of all with { inherit... } and just used let inherit...
The old forms presumably predates, or were made in ignorance of, `let inherit`. This way is better style as the scoping as more lexical, something which Nix can (or might already!) take advantage of.
This commit is contained in:
+2
-2
@@ -1,12 +1,12 @@
|
||||
# Operations on attribute sets.
|
||||
|
||||
with {
|
||||
let
|
||||
inherit (builtins) head tail length;
|
||||
inherit (import ./trivial.nix) or;
|
||||
inherit (import ./default.nix) fold;
|
||||
inherit (import ./strings.nix) concatStringsSep;
|
||||
inherit (import ./lists.nix) concatMap concatLists all deepSeqList;
|
||||
};
|
||||
in
|
||||
|
||||
rec {
|
||||
inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr;
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ with import ./attrsets.nix;
|
||||
with import ./options.nix;
|
||||
with import ./trivial.nix;
|
||||
with import ./strings.nix;
|
||||
with {inherit (import ./modules.nix) mergeDefinitions filterOverrides; };
|
||||
let inherit (import ./modules.nix) mergeDefinitions filterOverrides; in
|
||||
|
||||
rec {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user