diff src/ur/feed.urs @ 4:af95d9d73eb5

Feed.tree
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Jan 2011 18:04:15 -0500
parents ea0ca570c121
children 2717458d8951
line wrap: on
line diff
--- a/src/ur/feed.urs	Tue Jan 11 14:19:51 2011 -0500
+++ b/src/ur/feed.urs	Tue Jan 11 18:04:15 2011 -0500
@@ -2,6 +2,8 @@
 
 con tagInternal :: {Unit} -> Type
 
+val null : pattern unit (variant [])
+
 val tag : attrs ::: {Unit} -> folder attrs -> string -> $(mapU string attrs)
           -> pattern (tagInternal attrs) {Attrs : $(mapU string attrs), Cdata : option string}
 
@@ -15,4 +17,10 @@
                -> pattern parentI parent -> $(map (fn (i, d) => pattern i d) children) -> folder children
                -> pattern (childrenInternal parentI (map fst children)) (parent * $(map snd children))
 
+con treeInternal :: Type -> Type -> Type
+
+val tree : parentI ::: Type -> parent ::: Type -> childI ::: Type -> child ::: Type
+           -> pattern parentI parent -> pattern childI child
+           -> pattern (treeInternal parentI childI) (parent * child)
+
 val app : internal ::: Type -> data ::: Type -> pattern internal data -> (data -> transaction {}) -> string -> transaction {}