about summary refs log tree commit diff
path: root/src/eval.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.hh')
-rw-r--r--src/eval.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eval.hh b/src/eval.hh
index 719edb143354..2e764b1bd595 100644
--- a/src/eval.hh
+++ b/src/eval.hh
@@ -60,6 +60,12 @@ using namespace std;
    makeArg(Arg(Str(nm), (Bool(True), _))) => (nm, "1")
    makeArg(Arg(Str(nm), (Bool(False), _))) => (nm, undef)
 
+   subst(x, e1, e2) is defined as a generic topdown term
+   traversal of e2, replacing each `Var(x)' with e1, and not
+   descending into `Lam(x, _)'.
+
+   Note: all stored expressions must be closed. !!! ugly
+
    getFile :: Hash -> FileName
    loadExpr :: Hash -> FileName
    hashExpr :: Expr -> Hash 
@@ -76,6 +82,9 @@ Expr evalValue(Expr e);
 /* Return a canonical textual representation of an expression. */
 string printExpr(Expr e);
 
+/* Perform variable substitution. */
+Expr substExpr(string x, Expr rep, Expr e);
+
 /* Hash an expression. */
 Hash hashExpr(Expr e);