about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc2
-rw-r--r--src/libexpr/nixexpr.cc4
-rw-r--r--src/libexpr/parser.cc2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index f6634e8921a5..0470deee9c0c 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -227,6 +227,8 @@ Expr evalExpr2(EvalState & state, Expr e)
 
 Expr evalExpr(EvalState & state, Expr e)
 {
+    checkInterrupt();
+    
     startNest(nest, lvlVomit,
         format("evaluating expression: %1%") % e);
 
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index 816b39dc1ae3..dd0f5d58af27 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -87,6 +87,8 @@ string aterm2String(ATerm t)
 
 ATerm bottomupRewrite(TermFun & f, ATerm e)
 {
+    checkInterrupt();
+
     if (ATgetType(e) == AT_APPL) {
         AFun fun = ATgetAFun(e);
         int arity = ATgetArity(fun);
@@ -149,6 +151,8 @@ Expr makeAttrs(const ATermMap & attrs)
 
 Expr substitute(const ATermMap & subs, Expr e)
 {
+    checkInterrupt();
+
     ATMatcher m;
     string s;
 
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc
index b9e79e13d5f1..83b656342ff8 100644
--- a/src/libexpr/parser.cc
+++ b/src/libexpr/parser.cc
@@ -26,6 +26,8 @@ struct Cleanup : TermFun
 
     virtual ATerm operator () (ATerm e)
     {
+        checkInterrupt();
+        
         ATMatcher m;
         string s;