about summary refs log tree commit diff
path: root/src/nix-instantiate/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-08-24T14·03+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-08-24T14·03+0000
commitda25d80152fb6e51fe695dcd2ebaa4e00a7ee646 (patch)
tree27077c18f3f828d64f260260aa08e84bbe638d04 /src/nix-instantiate/main.cc
parent943ab38a0d0969004de231a6b3e89df88ffc6ccf (diff)
* Strict evaluation and XML printing of lists.
Diffstat (limited to 'src/nix-instantiate/main.cc')
-rw-r--r--src/nix-instantiate/main.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index 5eaaf5b2a844..6a0586a2d86d 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -47,7 +47,7 @@ static void printTermAsXML(Expr e, XMLWriter & doc)
     XMLAttrs attrs;
     ATerm s;
     int i;
-    ATermList as, formals;
+    ATermList as, es, formals;
     ATerm body, pos;
 
     if (matchStr(e, s))
@@ -84,6 +84,12 @@ static void printTermAsXML(Expr e, XMLWriter & doc)
         }
     }
 
+    else if (matchList(e, es)) {
+        XMLOpenElement _(doc, "list");
+        for (ATermIterator i(es); i; ++i)
+            printTermAsXML(*i, doc);
+    }
+
     else if (matchFunction(e, formals, body, pos)) {
         XMLOpenElement _(doc, "function");