about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-08T11·22+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-10-08T11·22+0200
commit51cf4455b2857efb6f3a2fda01b45baab2af7e73 (patch)
tree0b51a448bd90c8724eccaa650fa8ef1f95beb310 /src/libexpr/eval.cc
parent8a8752163611400e2386f1f1a449d9d3fb8f1496 (diff)
isFunctor: Simplify
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 93c3111af3e4..fb96e8b4d78f 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1291,6 +1291,12 @@ bool EvalState::forceBool(Value & v)
 }
 
 
+bool EvalState::isFunctor(Value & fun)
+{
+    return fun.type == tAttrs && fun.attrs->find(sFunctor) != fun.attrs->end();
+}
+
+
 void EvalState::forceFunction(Value & v, const Pos & pos)
 {
     forceValue(v);