aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/value.hh
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-16 13:36:01 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-16 13:36:01 -0400
commit745a03cef5977e3474dcf8ef43cb721a6a7cac8e (patch)
tree2c6b0a9ad5bcdddbc8ca0fdc1693092d2e726aff /src/libexpr/value.hh
parent230c9b4329b3d285e57f4cce058c121256187da1 (diff)
parent048e916f6477acc7e57e1d85e832d3efb42ad3f6 (diff)
Merge branch 'optional-derivation-output-storepath' of github.com:obsidiansystems/nix into ca-derivation-data-types
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r--src/libexpr/value.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh
index 71025824e..fe11bb2ed 100644
--- a/src/libexpr/value.hh
+++ b/src/libexpr/value.hh
@@ -166,6 +166,13 @@ struct Value
{
return type == tList1 ? 1 : type == tList2 ? 2 : bigList.size;
}
+
+ /* Check whether forcing this value requires a trivial amount of
+ computation. In particular, function applications are
+ non-trivial. */
+ bool isTrivial() const;
+
+ std::vector<std::pair<Path, std::string>> getContext();
};