aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-06 09:05:04 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-06 09:05:04 +0000
commit37483672d425bc3b7be8e1deb049fd04c80be0cf (patch)
tree1a424dc3c40bd9bc0ec50c30c2306abf213b79a7 /src
parentd34b4d4f287a62de915a4bf75caf18d236e9b7e4 (diff)
* App -> Call.
* Allow booleans in package environment bindings (True maps to "1", False maps to "").
Diffstat (limited to 'src')
-rw-r--r--src/fix.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fix.cc b/src/fix.cc
index 9111cd372..420dd7c04 100644
--- a/src/fix.cc
+++ b/src/fix.cc
@@ -161,7 +161,8 @@ static Expr evalExpr2(EvalState & state, Expr e)
}
/* Application. */
- if (ATmatch(e, "App(<term>, [<list>])", &e1, &e2)) {
+ if (ATmatch(e, "Call(<term>, [<list>])", &e1, &e2) ||
+ ATmatch(e, "App(<term>, [<list>])", &e1, &e2)) {
e1 = evalExpr(state, e1);
if (!ATmatch(e1, "Function([<list>], <term>)", &e3, &e4))
throw badTerm("expecting a function", e1);
@@ -277,6 +278,12 @@ static Expr evalExpr2(EvalState & state, Expr e)
}
fs.derive.env.push_back(StringPair(key, s1));
}
+ else if (ATmatch(value, "True")) {
+ fs.derive.env.push_back(StringPair(key, "1"));
+ }
+ else if (ATmatch(value, "False")) {
+ fs.derive.env.push_back(StringPair(key, ""));
+ }
else throw badTerm("invalid package argument", value);
bnds = ATinsert(bnds,