Mercurial > urweb
comparison lib/basis.lig @ 141:63c699450281
Initial form support
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 20 Jul 2008 11:33:23 -0400 |
parents | f214c535d253 |
children | 6f9e224692ec |
comparison
equal
deleted
inserted
replaced
140:f214c535d253 | 141:63c699450281 |
---|---|
7 | 7 |
8 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type | 8 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type |
9 | 9 |
10 | 10 |
11 con xml :: {Unit} -> {Type} -> {Type} -> Type | 11 con xml :: {Unit} -> {Type} -> {Type} -> Type |
12 val cdata : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> string -> xml ctx use bind | 12 val cdata : ctx ::: {Unit} -> use ::: {Type} -> string -> xml ctx use [] |
13 val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent | 13 val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent |
14 -> ctxOuter ::: {Unit} -> ctxInner ::: {Unit} | 14 -> ctxOuter ::: {Unit} -> ctxInner ::: {Unit} |
15 -> useOuter ::: {Type} -> useInner ::: {Type} -> useOuter ~ useInner | 15 -> useOuter ::: {Type} -> useInner ::: {Type} -> useOuter ~ useInner |
16 -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner | 16 -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner |
17 -> $attrsGiven | 17 -> $attrsGiven |
30 con page = xhtml [] [] | 30 con page = xhtml [] [] |
31 | 31 |
32 con html = [Html] | 32 con html = [Html] |
33 con head = [Head] | 33 con head = [Head] |
34 con body = [Body] | 34 con body = [Body] |
35 con form = [Body, Form] | 35 con lform = [Body, LForm] |
36 | 36 |
37 val head : unit -> tag [] html head [] [] | 37 val head : unit -> tag [] html head [] [] |
38 val title : unit -> tag [] head [] [] [] | 38 val title : unit -> tag [] head [] [] [] |
39 | 39 |
40 val body : unit -> tag [] html body [] [] | 40 val body : unit -> tag [] html body [] [] |
41 con bodyTag = fn attrs :: {Type} => ctx ::: {Unit} -> [Body] ~ ctx -> unit | 41 con bodyTag = fn attrs :: {Type} => ctx ::: {Unit} -> [Body] ~ ctx -> unit |
42 -> tag attrs ([Body] ++ ctx) ([Body] ++ ctx) [] [] | 42 -> tag attrs ([Body] ++ ctx) ([Body] ++ ctx) [] [] |
43 con bodyTagStandalone = fn attrs :: {Type} => ctx ::: {Unit} -> [Body] ~ ctx -> unit | |
44 -> tag attrs ([Body] ++ ctx) [] [] [] | |
45 | |
46 val br : bodyTagStandalone [] | |
43 | 47 |
44 val p : bodyTag [] | 48 val p : bodyTag [] |
45 val b : bodyTag [] | 49 val b : bodyTag [] |
46 val i : bodyTag [] | 50 val i : bodyTag [] |
47 val font : bodyTag [Size = int, Face = string] | 51 val font : bodyTag [Size = int, Face = string] |
49 val h1 : bodyTag [] | 53 val h1 : bodyTag [] |
50 val li : bodyTag [] | 54 val li : bodyTag [] |
51 | 55 |
52 val a : bodyTag [Link = page] | 56 val a : bodyTag [Link = page] |
53 | 57 |
54 val form : unit -> tag [] [Body] [Form] [] [] | 58 val lform : ctx ::: {Unit} -> [Body] ~ ctx -> bind ::: {Type} |
59 -> xml lform [] bind | |
60 -> xml ([Body] ++ ctx) [] [] | |
61 con lformTag = fn ty :: Type => fn attrs :: {Type} => | |
62 ctx ::: {Unit} -> [LForm] ~ ctx | |
63 -> nm :: Name -> unit | |
64 -> tag attrs ([LForm] ++ ctx) [] [] [nm = ty] | |
65 val textbox : lformTag string [] |