about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index ae6b2106f487..a42b9ebebaba 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -169,17 +169,16 @@ public:
        type. */
     bool evalBool(Env & env, Expr e);
 
-    /* Evaluate an expression, and recursively evaluate list elements
-       and attributes. */
-    void strictEval(Expr e, Value & v);
-    void strictEval(Env & env, Expr e, Value & v);
-
     /* If `v' is a thunk, enter it and overwrite `v' with the result
        of the evaluation of the thunk.  If `v' is a delayed function
        application, call the function and overwrite `v' with the
        result.  Otherwise, this is a no-op. */
     void forceValue(Value & v);
 
+    /* Force a value, then recursively force list elements and
+       attributes. */
+    void strictForceValue(Value & v);
+
     /* Force `v', and then verify that it has the expected type. */
     int forceInt(Value & v);
     bool forceBool(Value & v);
@@ -190,6 +189,10 @@ public:
     string forceString(Value & v, PathSet & context);
     string forceStringNoCtx(Value & v);
 
+    /* Return true iff the value `v' denotes a derivation (i.e. a
+       set with attribute `type = "derivation"'). */
+    bool isDerivation(Value & v);
+
     /* String coercion.  Converts strings, paths and derivations to a
        string.  If `coerceMore' is set, also converts nulls, integers,
        booleans and lists to a string.  If `copyToStore' is set,
@@ -219,10 +222,10 @@ private:
        elements and attributes are compared recursively. */
     bool eqValues(Value & v1, Value & v2);
 
-    void callFunction(Value & fun, Value & arg, Value & v);
-
 public:
     
+    void callFunction(Value & fun, Value & arg, Value & v);
+
     /* Allocation primitives. */
     Value * allocValues(unsigned int count);
     Env & allocEnv();
@@ -237,6 +240,10 @@ public:
 };
 
 
+/* Return a string representing the type of the value `v'. */
+string showType(Value & v);
+
+
 #if 0
 /* Evaluate an expression to normal form. */
 Expr evalExpr(EvalState & state, Expr e);