From 547b119f25dea97ff06cf754f2720e11b50f079f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Aug 2006 15:40:49 +0000 Subject: * Support singleton values and nested lists again in `args', but print a warning. --- src/libexpr/primops.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libexpr') diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 65e993708a34..8a513c5213fd 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); -- cgit 1.4.1