Mercurial > urweb
diff lib/basis.urs @ 601:7c3c21eb5b4c
Initial experiments with nested <dyn>
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 13 Jan 2009 15:17:11 -0500 |
parents | 4c2c740c6931 |
children |
line wrap: on
line diff
--- a/lib/basis.urs Sun Jan 11 10:41:38 2009 -0500 +++ b/lib/basis.urs Tue Jan 13 15:17:11 2009 -0500 @@ -86,6 +86,7 @@ con source :: Type -> Type val source : t ::: Type -> t -> transaction (source t) val set : t ::: Type -> source t -> t -> transaction unit +val get : t ::: Type -> source t -> transaction t con signal :: Type -> Type val signal_monad : monad signal @@ -443,6 +444,16 @@ -> tag [Value = string, Action = $use -> transaction page] ([Form] ++ ctx) ([Form] ++ ctx) use [] +(*** AJAX-oriented widgets *) + +con cformTag = fn (attrs :: {Type}) => + ctx ::: {Unit} + -> fn [[Body] ~ ctx] => + unit -> tag attrs ([Body] ++ ctx) [] [] [] + +val ctextbox : cformTag [Value = string, Size = int, Source = source string] +val button : cformTag [Value = string, Onclick = transaction unit] + (*** Tables *) val tabl : other ::: {Unit} -> fn [other ~ [Body, Table]] =>