From 3d94be61ea562dea2098b6570f711386179913ef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 Mar 2010 15:38:03 +0000 Subject: * Implemented derivations. --- src/libexpr/eval.hh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/libexpr/eval.hh') diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 198d936b9738..eba97dd73756 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 DrvRoots; typedef std::map 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(); }; -- cgit 1.4.1