about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-10-26T23·30+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-10-26T23·30+0000
commitc52dda95a69e02cd62d5ddac6ecf2229fe0c478f (patch)
tree0712d1b09a99c6898b6a7690646dbc6098ce7737
parent5fe9222b36ad49d74c84edb04d6bc4a7d844be01 (diff)
* Bug: check that term is an application.
-rw-r--r--NEWS2
-rwxr-xr-xsrc/libexpr/aterm-helper.pl2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c4d84740bd7f..4384e60cc1c7 100644
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,8 @@ Major changes include the following:
 
   * Various new operators (e.g., string concatenation).
 
+* Expression evaluation is much faster.
+
 * An Emacs mode for editing Nix expressions (with syntax highlighting
   and indentation) has been added.
 
diff --git a/src/libexpr/aterm-helper.pl b/src/libexpr/aterm-helper.pl
index 568141cb4ac2..9a1a931a91b6 100755
--- a/src/libexpr/aterm-helper.pl
+++ b/src/libexpr/aterm-helper.pl
@@ -66,7 +66,7 @@ while (<STDIN>) {
 
         print HEADER "#ifdef __cplusplus\n";
         print HEADER "static inline bool match$funname(ATerm e$formals2) {\n";
-        print HEADER "    if (ATgetAFun(e) != sym$funname) return false;\n";
+        print HEADER "    if (ATgetType(e) != AT_APPL || ATgetAFun(e) != sym$funname) return false;\n";
         print HEADER "$unpack";
         print HEADER "    return true;\n";
         print HEADER "}\n";