Mercurial > urweb
diff lib/ur/basis.urs @ 756:8ce31c052dce
Subforms
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 28 Apr 2009 17:26:53 -0400 |
parents | d484df4e841a |
children | fa2019a63ea4 |
line wrap: on
line diff
--- a/lib/ur/basis.urs Tue Apr 28 15:15:21 2009 -0400 +++ b/lib/ur/basis.urs Tue Apr 28 17:26:53 2009 -0400 @@ -555,9 +555,16 @@ val img : bodyTag [Src = url] val form : ctx ::: {Unit} -> bind ::: {Type} - -> [[Body] ~ ctx] => - xml form [] bind - -> xml ([Body] ++ ctx) [] [] + -> [[Body] ~ ctx] => + xml form [] bind + -> xml ([Body] ++ ctx) [] [] + +val subform : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} + -> [[Form] ~ ctx] => + nm :: Name -> [[nm] ~ use] => + xml form [] bind + -> xml ([Form] ++ ctx) use [nm = $bind] + con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) => ctx ::: {Unit} -> [[Form] ~ ctx] =>