comparison lib/basis.lig @ 139:adfa2c7a75da

Form binding parameters threaded through
author Adam Chlipala <adamc@hcoop.net>
date Sun, 20 Jul 2008 10:11:16 -0400
parents 7fdc146b2bc2
children f214c535d253
comparison
equal deleted inserted replaced
138:d6d78055f001 139:adfa2c7a75da
3 type string 3 type string
4 4
5 type unit = {} 5 type unit = {}
6 6
7 7
8 con tag :: {Type} -> {Unit} -> {Unit} -> Type 8 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type
9 9
10 10
11 con xml :: {Unit} -> Type 11 con xml :: {Unit} -> {Type} -> {Type} -> Type
12 val cdata : ctx ::: {Unit} -> string -> xml ctx 12 val cdata : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> string -> xml ctx use bind
13 val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent 13 val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent
14 -> outer ::: {Unit} -> inner ::: {Unit} 14 -> ctxOuter ::: {Unit} -> ctxInner ::: {Unit}
15 -> useOuter ::: {Type} -> useInner ::: {Type} -> useOuter ~ useInner
16 -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner
15 -> $attrsGiven 17 -> $attrsGiven
16 -> tag (attrsGiven ++ attrsAbsent) outer inner 18 -> tag (attrsGiven ++ attrsAbsent) ctxOuter ctxInner useOuter bindOuter
17 -> xml inner 19 -> xml ctxInner useInner bindInner
18 -> xml outer 20 -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner)
19 val join : shared :: {Unit} 21 val join : sharedCtx :: {Unit}
20 -> ctx1 ::: {Unit} -> ctx1 ~ shared 22 -> ctx1 ::: {Unit} -> ctx1 ~ sharedCtx
21 -> ctx2 ::: {Unit} -> ctx2 ~ shared 23 -> ctx2 ::: {Unit} -> ctx2 ~ sharedCtx
22 -> xml (shared ++ ctx1) -> xml (shared ++ ctx2) -> xml shared 24 -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type}
25 -> use1 ~ bind1 -> bind1 ~ bind2
26 -> xml (sharedCtx ++ ctx1) use1 bind1
27 -> xml (sharedCtx ++ ctx2) (use1 ++ bind1) bind2
28 -> xml sharedCtx use1 (bind1 ++ bind2)
23 29
24 30
25 con xhtml = xml [Html] 31 con xhtml = xml [Html]
32 con page = xhtml [] []
26 33
27 val head : tag [] [Html] [Head] 34 val head : tag [] [Html] [Head] [] []
28 val title : tag [] [Head] [] 35 val title : tag [] [Head] [] [] []
29 36
30 val body : tag [] [Html] [Body] 37 val body : tag [] [Html] [Body] [] []
31 val p : tag [] [Body] [Body] 38 val p : tag [] [Body] [Body] [] []
32 val b : tag [] [Body] [Body] 39 val b : tag [] [Body] [Body] [] []
33 val i : tag [] [Body] [Body] 40 val i : tag [] [Body] [Body] [] []
34 val font : tag [Size = int, Face = string] [Body] [Body] 41 val font : tag [Size = int, Face = string] [Body] [Body] [] []
35 42
36 val h1 : tag [] [Body] [Body] 43 val h1 : tag [] [Body] [Body] [] []
37 val li : tag [] [Body] [Body] 44 val li : tag [] [Body] [Body] [] []
38 45
39 val a : tag [Link = xhtml] [Body] [Body] 46 val a : tag [Link = page] [Body] [Body] [] []