diff tests/subforms.ur @ 758:8323c1beef2e

Subforms type-checks; lists urlified and unurlified
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 11:48:56 -0400
parents
children 67cd8326f743
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/subforms.ur	Thu Apr 30 11:48:56 2009 -0400
@@ -0,0 +1,23 @@
+fun handler' ls =
+    case ls of
+        Nil => <xml/>
+      | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml>
+
+fun handler r = return <xml><body>
+  {[r.A]}, {handler' r.Sub}, {[r.C]}
+</body></xml>
+
+fun main () = return <xml><body>
+  <form>
+    <textbox{#A}/><br/>
+    <subforms{#Sub}>
+      <entry>
+        <textbox{#A}/><br/>
+        <textbox{#B}/><br/>
+        <textbox{#Sub}/><br/>
+      </entry>
+    </subforms>
+    <textbox{#C}/><br/>
+    <submit action={handler}/>
+  </form>
+</body></xml>