diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-08-06T09·05+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-08-06T09·05+0000 |
commit | 37483672d425bc3b7be8e1deb049fd04c80be0cf (patch) | |
tree | 1a424dc3c40bd9bc0ec50c30c2306abf213b79a7 | |
parent | d34b4d4f287a62de915a4bf75caf18d236e9b7e4 (diff) |
* App -> Call.
* Allow booleans in package environment bindings (True maps to "1", False maps to "").
-rw-r--r-- | src/fix.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fix.cc b/src/fix.cc index 9111cd372733..420dd7c0495c 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, |