From e629ecd57d331ecd0426890d48be3482ec3e4ea1 Mon Sep 17 00:00:00 2001 From: anntnzrb Date: Wed, 8 Oct 2025 23:59:40 -0500 Subject: [PATCH] refactor: use point-free style for path utilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use fp.compose for get-output-name and get-directory-name to leverage existing composition utilities and adopt more idiomatic functional style. Changes: - path/default.nix: Convert to point-free using snowfall-lib.fp.compose Impact: Improved code style, more functional approach Testing: nix flake check ✓ --- snowfall-lib/path/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/snowfall-lib/path/default.nix b/snowfall-lib/path/default.nix index a5c7bbc..1a35325 100644 --- a/snowfall-lib/path/default.nix +++ b/snowfall-lib/path/default.nix @@ -131,8 +131,9 @@ in ## "bar" ## ``` #@ Path -> String - get-output-name = path: - builtins.unsafeDiscardStringContext (get-parent-directory path); + get-output-name = snowfall-lib.fp.compose + builtins.unsafeDiscardStringContext + get-parent-directory; ## Get the directory name for flake outputs. ## Example Usage: @@ -144,8 +145,9 @@ in ## "foo" ## ``` #@ Path -> String - get-directory-name = path: - builtins.unsafeDiscardStringContext (baseNameOf path); + get-directory-name = snowfall-lib.fp.compose + builtins.unsafeDiscardStringContext + baseNameOf; ## Get relative module path from source directory. ## Example Usage: