summaryrefslogtreecommitdiff
path: root/demo/tree.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/tree.ur')
-rw-r--r--demo/tree.ur15
1 files changed, 15 insertions, 0 deletions
diff --git a/demo/tree.ur b/demo/tree.ur
new file mode 100644
index 00000000..06a30cf9
--- /dev/null
+++ b/demo/tree.ur
@@ -0,0 +1,15 @@
+table t : { Id : int, Parent : option int, Nam : string }
+
+open TreeFun.Make(struct
+ val tab = t
+ end)
+
+fun row r = <xml>
+ #{[r.Id]}: {[r.Nam]}
+</xml>
+
+fun main () =
+ xml <- tree row None;
+ return <xml><body>
+ {xml}
+ </body></xml>