diff lib/basis.lig @ 153:cfe6f9db74aa

radio and radioOption
author Adam Chlipala <adamc@hcoop.net>
date Thu, 24 Jul 2008 11:10:23 -0400
parents 67ab26888839
children e2b185379592
line wrap: on
line diff
--- a/lib/basis.lig	Thu Jul 24 10:41:53 2008 -0400
+++ b/lib/basis.lig	Thu Jul 24 11:10:23 2008 -0400
@@ -61,12 +61,16 @@
 val lform : ctx ::: {Unit} -> [Body] ~ ctx -> bind ::: {Type}
         -> xml lform [] bind
         -> xml ([Body] ++ ctx) [] []
-con lformTag = fn ty :: Type => fn attrs :: {Type} =>
+con lformTag = fn ty :: Type => fn inner :: {Unit} => fn attrs :: {Type} =>
         ctx ::: {Unit} -> [LForm] ~ ctx
         -> nm :: Name -> unit
-        -> tag attrs ([LForm] ++ ctx) [] [] [nm = ty]
-val textbox : lformTag string []
-val ltextarea : lformTag string []
+        -> tag attrs ([LForm] ++ ctx) inner [] [nm = ty]
+val textbox : lformTag string [] []
+val ltextarea : lformTag string [] []
+
+con radio = [Body, Radio]
+val radio : lformTag string radio []
+val radioOption : unit -> tag [Value = string] radio [] [] []
 
 val submit : ctx ::: {Unit} -> [LForm] ~ ctx
         -> use ::: {Type} -> unit