about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-08-29T15·40+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-08-29T15·40+0000
commit547b119f25dea97ff06cf754f2720e11b50f079f (patch)
tree4b2dbe9423125291e48e79a7b681b674a997b80b /src/libexpr/primops.cc
parent2132d9ddeba14ea2ddcbb16fa51ddb16c45c3c6a (diff)
* Support singleton values and nested lists again in `args', but print
  a warning.

Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 65e993708a..8a513c5213 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -269,7 +269,11 @@ static Expr primDerivationStrict(EvalState & state, const ATermVector & args)
             if (key == "args") {
                 ATermList es;
                 value = evalExpr(state, value);
-                if (!matchList(value, es)) throw Error(format("`args' should be a list %1%") % value);
+                if (!matchList(value, es)) {
+                    static bool haveWarned = false;
+                    warnOnce(haveWarned, "the `args' attribute should evaluate to a list");
+                    es = flattenList(state, value);
+                }
                 for (ATermIterator i(es); i; ++i) {
                     string s;
                     toString(state, *i, context, s);