From b7af0be9b299b5bf87380b1d197831b300c5a9aa Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Thu, 15 Jan 2026 11:43:20 +1000 Subject: [PATCH] fix import styling --- nib/parse/struct.nix | 23 +++++++++++++---------- nib/std/attrs.nix | 19 ++++++++++++++++++- nib/std/lists.nix | 8 ++++++++ 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/nib/parse/struct.nix b/nib/parse/struct.nix index 729136a..ca1a4d1 100644 --- a/nib/parse/struct.nix +++ b/nib/parse/struct.nix @@ -1,15 +1,18 @@ {nib, ...}: let - Err = nib.types.Err; - Ok' = nib.types.Ok'; - firstErr = nib.types.firstErr; + inherit + (nib.types) + Err + Ok' + firstErr + unwrapSome + isTerminal + unwrapTerminal + ; - unwrapSome = nib.types.unwrapSome; - - isTerminal = nib.types.isTerminal; - unwrapTerminal = nib.types.unwrapTerminal; - - mapAttrsRecursiveCond = nib.std.mapAttrsRecursiveCond; - attrValueAt = nib.std.attrValueAt; + inherit + (nib.std) + attrValueAt + ; in rec { cmpStructErr' = errBadKeys: errBadValues: path: S: T: if builtins.isAttrs S && builtins.isAttrs T diff --git a/nib/std/attrs.nix b/nib/std/attrs.nix index 7fe7c75..8a7e0bd 100644 --- a/nib/std/attrs.nix +++ b/nib/std/attrs.nix @@ -1,5 +1,22 @@ {nib, ...}: let - foldl = nib.std.foldl; + inherit + (builtins) + all + attrNames + elemAt + filter + hasAttr + isAttrs + length + listToAttrs + mapAttrs + ; + + inherit + (nib.std) + foldl + ; + inherit (nib.types) nullableToMaybe diff --git a/nib/std/lists.nix b/nib/std/lists.nix index 54ff919..8d09937 100644 --- a/nib/std/lists.nix +++ b/nib/std/lists.nix @@ -1,4 +1,12 @@ {nib, ...}: let + inherit + (builtins) + concatMap + elemAt + foldl' + genList + length + ; inherit (nib.std) min