aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-03-19 14:45:45 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-03-19 14:45:45 +0000
commit79bb0008ec9afa8d8cee9e6b807a579bcb1c92ab (patch)
treec2874f394da9d9de0ce37dc031914ba140afdb58
parente6253b58cdb6b3836a616821b7f5dc66790ac989 (diff)
* `null' is a normal form.
-rw-r--r--src/libexpr/eval.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 335f44baa..7ee157c31 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -186,14 +186,17 @@ Expr evalExpr2(EvalState & state, Expr e)
ATerm name;
/* Normal forms. */
- if (atMatch(m, e) >> "Str" ||
- atMatch(m, e) >> "Path" ||
- atMatch(m, e) >> "Uri" ||
- atMatch(m, e) >> "Int" ||
- atMatch(m, e) >> "Bool" ||
- atMatch(m, e) >> "Function" ||
- atMatch(m, e) >> "Attrs" ||
- atMatch(m, e) >> "List")
+ string cons;
+ if (atMatch(m, e) >> cons &&
+ (cons == "Str" ||
+ cons == "Path" ||
+ cons == "Uri" ||
+ cons == "Null" ||
+ cons == "Int" ||
+ cons == "Bool" ||
+ cons == "Function" ||
+ cons == "Attrs" ||
+ cons == "List"))
return e;
/* Any encountered variables must be undeclared or primops. */