diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-31 15:38:03 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-31 15:38:03 +0000 |
commit | 3d94be61ea562dea2098b6570f711386179913ef (patch) | |
tree | 9afd60cf782d5824efc4bafba98af1ee6af937f4 /src/libexpr/eval.hh | |
parent | 51876789131e81dca9807c00773158160c3824c2 (diff) |
* Implemented derivations.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 198d936b9..eba97dd73 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -109,7 +109,6 @@ void mkString(Value & v, const string & s, const PathSet & context = PathSet()); void mkPath(Value & v, const char * s); -typedef std::map<Path, PathSet> DrvRoots; typedef std::map<Path, Hash> DrvHashes; /* Cache for calls to addToStore(); maps source paths to the store @@ -124,8 +123,10 @@ std::ostream & operator << (std::ostream & str, Value & v); class EvalState { - DrvRoots drvRoots; +public: DrvHashes drvHashes; /* normalised derivation hashes */ + +private: SrcToStore srcToStore; unsigned long nrValues; @@ -164,9 +165,11 @@ public: /* Force `v', and then verify that it has the expected type. */ int forceInt(Value & v); + bool forceBool(Value & v); void forceAttrs(Value & v); void forceList(Value & v); void forceFunction(Value & v); // either lambda or primop + string forceString(Value & v); string forceStringNoCtx(Value & v); /* String coercion. Converts strings, paths and derivations to a @@ -209,6 +212,8 @@ public: void mkList(Value & v, unsigned int length); void mkAttrs(Value & v); + void cloneAttrs(Value & src, Value & dst); + /* Print statistics. */ void printStats(); }; |