refactor: use point-free style for path utilities

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 ✓
This commit is contained in:
anntnzrb
2025-10-08 23:59:40 -05:00
parent 06620a8e41
commit e629ecd57d

View File

@@ -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: