about summary refs log tree commit diff
path: root/src/fix-ng/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-06T14·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-06T14·41+0000
commitcfaea07444a0011aa7d91ce1bcc8f105b8f283fa (patch)
tree67a5f2ececd0b962a916f4f3249ac8bd8da24bbc /src/fix-ng/eval.cc
parent569e7940f878f27b0fb9d3c8e8abfc29f3379103 (diff)
* `null' is a nullary primop.
Diffstat (limited to 'src/fix-ng/eval.cc')
-rw-r--r--src/fix-ng/eval.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fix-ng/eval.cc b/src/fix-ng/eval.cc
index 1f131fb7b0df..8e10caa843ac 100644
--- a/src/fix-ng/eval.cc
+++ b/src/fix-ng/eval.cc
@@ -137,12 +137,12 @@ Expr evalExpr2(EvalState & state, Expr e)
         ATmatch(e, "Bool(<term>)", &e1) ||
         ATmatch(e, "Function([<list>], <term>)", &e1, &e2) ||
         ATmatch(e, "Attrs([<list>])", &e1) ||
-        ATmatch(e, "List([<list>])", &e1) ||
-        ATmatch(e, "Null", &e1))
+        ATmatch(e, "List([<list>])", &e1))
         return e;
 
     /* Any encountered variables must be undeclared or primops. */
     if (ATmatch(e, "Var(<str>)", &s1)) {
+        if ((string) s1 == "null") return primNull(state);
         return e;
     }
 
@@ -159,7 +159,6 @@ Expr evalExpr2(EvalState & state, Expr e)
             if (primop == "derivation") return primDerivation(state, e2);
             if (primop == "toString") return primToString(state, e2);
             if (primop == "baseNameOf") return primBaseNameOf(state, e2);
-            if (primop == "null") return primNull(state, e2);
             if (primop == "isNull") return primIsNull(state, e2);
             else throw badTerm("undefined variable/primop", e1);
         }