about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-10-26T17·10+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-10-26T17·10+0000
commiteb8284ddaa66448d369647f68cb9f89b93a187de (patch)
treec072a560f25c7856cc243b7e0f5bd7250c76789a /src/libexpr
parent033d7c65930c7613fa21510f03984d764fcdb7d3 (diff)
* Evaluate argument to `import'.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index ade483dc703d..a51a5119af3d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -9,7 +9,8 @@ static Expr primImport(EvalState & state, const ATermVector & args)
 {
     ATMatcher m;
     string path;
-    if (!(atMatch(m, args[0]) >> "Path" >> path))
+    Expr fn = evalExpr(state, args[0]);
+    if (!(atMatch(m, fn) >> "Path" >> path))
         throw Error("path expected");
     return evalFile(state, path);
 }