about summary refs log tree commit diff
path: root/src/fstate.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-09T15·02+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-09T15·02+0000
commit2b95a9dc05d0a943859ba92bb301c294473758f1 (patch)
tree7eb1a6af395553a2c9af6a072820bcaf3f040e76 /src/fstate.hh
parent9a99dc736d814f41d2b3ceb92da2435ae2dd5632 (diff)
* When computing the set of paths referenced by an expression, also
  include the paths of the subterms.

Diffstat (limited to 'src/fstate.hh')
-rw-r--r--src/fstate.hh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fstate.hh b/src/fstate.hh
index de6303dca1e4..159c7ba46338 100644
--- a/src/fstate.hh
+++ b/src/fstate.hh
@@ -1,6 +1,8 @@
 #ifndef __EVAL_H
 #define __EVAL_H
 
+#include <set>
+
 extern "C" {
 #include <aterm2.h>
 }
@@ -59,17 +61,19 @@ using namespace std;
 typedef ATerm FState;
 typedef ATerm Content;
 
+typedef set<string> StringSet;
+
 
 /* Realise an fstate expression in the file system.  This requires
    execution of all Derive() nodes. */
-FState realiseFState(FState fs);
+FState realiseFState(FState fs, StringSet & paths);
 
 /* Return the path of an fstate expression.  An empty string is
    returned if the term is not a valid fstate expression. (!!!) */
 string fstatePath(FState fs);
 
 /* Return the paths referenced by fstate expression. */
-Strings fstateRefs(FState fs);
+void fstateRefs(FState fs, StringSet & paths);
 
 /* Return a canonical textual representation of an expression. */
 string printTerm(ATerm t);
@@ -82,10 +86,10 @@ Error badTerm(const format & f, ATerm t);
 Hash hashTerm(ATerm t);
 
 /* Read an aterm from disk, given its hash. */
-ATerm termFromHash(const Hash & hash);
+ATerm termFromHash(const Hash & hash, string * p = 0);
 
 /* Write an aterm to the Nix store directory, and return its hash. */
-Hash writeTerm(ATerm t);
+Hash writeTerm(ATerm t, const string & suffix, string * p = 0);
 
 
 #endif /* !__EVAL_H */