comparison 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
comparison
equal deleted inserted replaced
600:d1cce194180d 601:7c3c21eb5b4c
84 val transaction_monad : monad transaction 84 val transaction_monad : monad transaction
85 85
86 con source :: Type -> Type 86 con source :: Type -> Type
87 val source : t ::: Type -> t -> transaction (source t) 87 val source : t ::: Type -> t -> transaction (source t)
88 val set : t ::: Type -> source t -> t -> transaction unit 88 val set : t ::: Type -> source t -> t -> transaction unit
89 val get : t ::: Type -> source t -> transaction t
89 90
90 con signal :: Type -> Type 91 con signal :: Type -> Type
91 val signal_monad : monad signal 92 val signal_monad : monad signal
92 val signal : t ::: Type -> source t -> signal t 93 val signal : t ::: Type -> source t -> signal t
93 94
441 -> fn [[Form] ~ ctx] => 442 -> fn [[Form] ~ ctx] =>
442 unit 443 unit
443 -> tag [Value = string, Action = $use -> transaction page] 444 -> tag [Value = string, Action = $use -> transaction page]
444 ([Form] ++ ctx) ([Form] ++ ctx) use [] 445 ([Form] ++ ctx) ([Form] ++ ctx) use []
445 446
447 (*** AJAX-oriented widgets *)
448
449 con cformTag = fn (attrs :: {Type}) =>
450 ctx ::: {Unit}
451 -> fn [[Body] ~ ctx] =>
452 unit -> tag attrs ([Body] ++ ctx) [] [] []
453
454 val ctextbox : cformTag [Value = string, Size = int, Source = source string]
455 val button : cformTag [Value = string, Onclick = transaction unit]
456
446 (*** Tables *) 457 (*** Tables *)
447 458
448 val tabl : other ::: {Unit} -> fn [other ~ [Body, Table]] => 459 val tabl : other ::: {Unit} -> fn [other ~ [Body, Table]] =>
449 unit -> tag [Border = int] ([Body] ++ other) ([Body, Table] ++ other) [] [] 460 unit -> tag [Border = int] ([Body] ++ other) ([Body, Table] ++ other) [] []
450 val tr : other ::: {Unit} -> fn [other ~ [Body, Table, Tr]] => 461 val tr : other ::: {Unit} -> fn [other ~ [Body, Table, Tr]] =>