diff options
author | piegames <git@piegames.de> | 2024-07-11 10:49:15 +0200 |
---|---|---|
committer | piegames <git@piegames.de> | 2024-08-08 11:13:53 +0200 |
commit | 28ae24f3f738a50903bd9b9bf8eece84a1075c30 (patch) | |
tree | dae4696680c5acd3ada9f170976c6b7581e9be82 /src/libutil | |
parent | 6fdb47f0b259a9ffbe4bdb349d6aaf03a0144092 (diff) |
libexpr: Add experimental pipe operator
The |> operator is a reverse function operator with low binding strength
to replace lib.pipe. Implements RFC 148, see the RFC text for more
details. Closes #438.
Change-Id: I21df66e8014e0d4dd9753dd038560a2b0b7fd805
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/experimental-features.cc | 10 | ||||
-rw-r--r-- | src/libutil/experimental-features.hh | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/libutil/experimental-features.cc b/src/libutil/experimental-features.cc index 3a834293a..15a18c770 100644 --- a/src/libutil/experimental-features.cc +++ b/src/libutil/experimental-features.cc @@ -167,6 +167,16 @@ constexpr std::array<ExperimentalFeatureDetails, numXpFeatures> xpFeatureDetails )", }, { + .tag = Xp::PipeOperator, + .name = "pipe-operator", + .description = R"( + Enable new operators for function application to "pipe" arguments through a chain of functions similar to `lib.pipe`. + This implementation is based on Nix [RFC 148](https://github.com/NixOS/rfcs/pull/148). + + Tracking issue: https://git.lix.systems/lix-project/lix/issues/438 + )", + }, + { .tag = Xp::FetchClosure, .name = "fetch-closure", .description = R"( diff --git a/src/libutil/experimental-features.hh b/src/libutil/experimental-features.hh index 38889e7bc..121318d23 100644 --- a/src/libutil/experimental-features.hh +++ b/src/libutil/experimental-features.hh @@ -21,6 +21,7 @@ enum struct ExperimentalFeature NixCommand, RecursiveNix, NoUrlLiterals, + PipeOperator, FetchClosure, ReplFlake, AutoAllocateUids, |