Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1555:d5c961c709f9 | 1556:e1f5d9c4cc20 |
---|---|
666 val currentUrlHasQueryString : transaction bool | 666 val currentUrlHasQueryString : transaction bool |
667 val url : transaction page -> url | 667 val url : transaction page -> url |
668 val effectfulUrl : (option queryString -> transaction page) -> url | 668 val effectfulUrl : (option queryString -> transaction page) -> url |
669 val redirect : t ::: Type -> url -> transaction t | 669 val redirect : t ::: Type -> url -> transaction t |
670 | 670 |
671 type id | |
672 val fresh : transaction id | |
673 | |
671 val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ body] => unit | 674 val dyn : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> [ctx ~ body] => unit |
672 -> tag [Signal = signal (xml (body ++ ctx) use bind)] (body ++ ctx) [] use bind | 675 -> tag [Signal = signal (xml (body ++ ctx) use bind)] (body ++ ctx) [] use bind |
673 | 676 |
674 val head : unit -> tag [] html head [] [] | 677 val head : unit -> tag [] html head [] [] |
675 val title : unit -> tag [] head [] [] [] | 678 val title : unit -> tag [] head [] [] [] |
676 val link : unit -> tag [Id = string, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] | 679 val link : unit -> tag [Id = id, Rel = string, Typ = string, Href = url, Media = string] head [] [] [] |
677 | 680 |
678 val body : unit -> tag [Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit] | 681 val body : unit -> tag [Onload = transaction unit, Onresize = transaction unit, Onunload = transaction unit] |
679 html body [] [] | 682 html body [] [] |
680 con bodyTag = fn (attrs :: {Type}) => | 683 con bodyTag = fn (attrs :: {Type}) => |
681 ctx ::: {Unit} -> | 684 ctx ::: {Unit} -> |
684 con bodyTagStandalone = fn (attrs :: {Type}) => | 687 con bodyTagStandalone = fn (attrs :: {Type}) => |
685 ctx ::: {Unit} | 688 ctx ::: {Unit} |
686 -> [[Body] ~ ctx] => | 689 -> [[Body] ~ ctx] => |
687 unit -> tag attrs ([Body] ++ ctx) [] [] [] | 690 unit -> tag attrs ([Body] ++ ctx) [] [] [] |
688 | 691 |
689 val br : bodyTagStandalone [Id = int] | 692 val br : bodyTagStandalone [Id = id] |
690 | 693 |
691 con focusEvents = [Onblur = transaction unit, Onfocus = transaction unit] | 694 con focusEvents = [Onblur = transaction unit, Onfocus = transaction unit] |
692 con mouseEvents = [Onclick = transaction unit, Ondblclick = transaction unit, | 695 con mouseEvents = [Onclick = transaction unit, Ondblclick = transaction unit, |
693 Onmousedown = transaction unit, Onmousemove = transaction unit, | 696 Onmousedown = transaction unit, Onmousemove = transaction unit, |
694 Onmouseout = transaction unit, Onmouseover = transaction unit, | 697 Onmouseout = transaction unit, Onmouseover = transaction unit, |
699 con resizeEvents = [Onresize = transaction unit] | 702 con resizeEvents = [Onresize = transaction unit] |
700 | 703 |
701 con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents | 704 con boxEvents = focusEvents ++ mouseEvents ++ keyEvents ++ resizeEvents |
702 con tableEvents = focusEvents ++ mouseEvents ++ keyEvents | 705 con tableEvents = focusEvents ++ mouseEvents ++ keyEvents |
703 | 706 |
704 con boxAttrs = [Id = string, Title = string] ++ boxEvents | 707 con boxAttrs = [Id = id, Title = string] ++ boxEvents |
705 con tableAttrs = [Id = string, Title = string] ++ tableEvents | 708 con tableAttrs = [Id = id, Title = string] ++ tableEvents |
706 | 709 |
707 val span : bodyTag boxAttrs | 710 val span : bodyTag boxAttrs |
708 val div : bodyTag boxAttrs | 711 val div : bodyTag boxAttrs |
709 | 712 |
710 val p : bodyTag boxAttrs | 713 val p : bodyTag boxAttrs |
787 type postBody | 790 type postBody |
788 val postType : postBody -> string | 791 val postType : postBody -> string |
789 val postData : postBody -> string | 792 val postData : postBody -> string |
790 | 793 |
791 con radio = [Body, Radio] | 794 con radio = [Body, Radio] |
792 val radio : formTag string radio [Id = string] | 795 val radio : formTag string radio [Id = id] |
793 val radioOption : unit -> tag ([Value = string, Checked = bool] ++ boxAttrs) radio [] [] [] | 796 val radioOption : unit -> tag ([Value = string, Checked = bool] ++ boxAttrs) radio [] [] [] |
794 | 797 |
795 con select = [Select] | 798 con select = [Select] |
796 val select : formTag string select ([Onchange = transaction unit] ++ boxAttrs) | 799 val select : formTag string select ([Onchange = transaction unit] ++ boxAttrs) |
797 val option : unit -> tag [Value = string, Selected = bool] select [] [] [] | 800 val option : unit -> tag [Value = string, Selected = bool] select [] [] [] |