Mercurial > urweb
diff lib/ur/basis.urs @ 1556:e1f5d9c4cc20
An abstract type of IDs
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 03 Sep 2011 12:51:05 -0400 |
parents | d5c961c709f9 |
children | 4a13e1b73641 |
line wrap: on
line diff
--- a/lib/ur/basis.urs Sat Sep 03 11:48:12 2011 -0400 +++ b/lib/ur/basis.urs Sat Sep 03 12:51:05 2011 -0400 @@ -668,12 +668,15 @@ val effectfulUrl : (option queryString -> transaction page) -> url val redirect : t ::: Type -> url -> transaction t +type id +val fresh : transaction id + val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ body] => unit -> tag [Signal = signal (xml (body ++ ctx) use bind)] (body ++ ctx) [] use bind val head : unit -> tag [] html head [] [] val title : unit -> tag [] head [] [] [] -val link : unit -> tag [Id = string, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] +val link : unit -> tag [Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] val body : unit -> tag [Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit] html body [] [] @@ -686,7 +689,7 @@ -> [[Body] ~ ctx] => unit -> tag attrs ([Body] ++ ctx) [] [] [] -val br : bodyTagStandalone [Id = int] +val br : bodyTagStandalone [Id = id] con focusEvents = [Onblur = transaction unit, Onfocus = transaction unit] con mouseEvents = [Onclick = transaction unit, Ondblclick = transaction unit, @@ -701,8 +704,8 @@ con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents con tableEvents = focusEvents ++ mouseEvents ++ keyEvents -con boxAttrs = [Id = string, Title = string] ++ boxEvents -con tableAttrs = [Id = string, Title = string] ++ tableEvents +con boxAttrs = [Id = id, Title = string] ++ boxEvents +con tableAttrs = [Id = id, Title = string] ++ tableEvents val span : bodyTag boxAttrs val div : bodyTag boxAttrs @@ -789,7 +792,7 @@ val postData : postBody -> string con radio = [Body, Radio] -val radio : formTag string radio [Id = string] +val radio : formTag string radio [Id = id] val radioOption : unit -> tag ([Value = string, Checked = bool] ++ boxAttrs) radio [] [] [] con select = [Select]