comparison lib/basis.lig @ 140:f214c535d253

A simpler context encoding
author Adam Chlipala <adamc@hcoop.net>
date Sun, 20 Jul 2008 10:40:25 -0400
parents adfa2c7a75da
children 63c699450281
comparison
equal deleted inserted replaced
139:adfa2c7a75da 140:f214c535d253
16 -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner 16 -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner
17 -> $attrsGiven 17 -> $attrsGiven
18 -> tag (attrsGiven ++ attrsAbsent) ctxOuter ctxInner useOuter bindOuter 18 -> tag (attrsGiven ++ attrsAbsent) ctxOuter ctxInner useOuter bindOuter
19 -> xml ctxInner useInner bindInner 19 -> xml ctxInner useInner bindInner
20 -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner) 20 -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner)
21 val join : sharedCtx :: {Unit} 21 val join : ctx ::: {Unit}
22 -> ctx1 ::: {Unit} -> ctx1 ~ sharedCtx
23 -> ctx2 ::: {Unit} -> ctx2 ~ sharedCtx
24 -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type} 22 -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type}
25 -> use1 ~ bind1 -> bind1 ~ bind2 23 -> use1 ~ bind1 -> bind1 ~ bind2
26 -> xml (sharedCtx ++ ctx1) use1 bind1 24 -> xml ctx use1 bind1
27 -> xml (sharedCtx ++ ctx2) (use1 ++ bind1) bind2 25 -> xml ctx (use1 ++ bind1) bind2
28 -> xml sharedCtx use1 (bind1 ++ bind2) 26 -> xml ctx use1 (bind1 ++ bind2)
29 27
30 28
31 con xhtml = xml [Html] 29 con xhtml = xml [Html]
32 con page = xhtml [] [] 30 con page = xhtml [] []
33 31
34 val head : tag [] [Html] [Head] [] [] 32 con html = [Html]
35 val title : tag [] [Head] [] [] [] 33 con head = [Head]
34 con body = [Body]
35 con form = [Body, Form]
36 36
37 val body : tag [] [Html] [Body] [] [] 37 val head : unit -> tag [] html head [] []
38 val p : tag [] [Body] [Body] [] [] 38 val title : unit -> tag [] head [] [] []
39 val b : tag [] [Body] [Body] [] []
40 val i : tag [] [Body] [Body] [] []
41 val font : tag [Size = int, Face = string] [Body] [Body] [] []
42 39
43 val h1 : tag [] [Body] [Body] [] [] 40 val body : unit -> tag [] html body [] []
44 val li : tag [] [Body] [Body] [] [] 41 con bodyTag = fn attrs :: {Type} => ctx ::: {Unit} -> [Body] ~ ctx -> unit
42 -> tag attrs ([Body] ++ ctx) ([Body] ++ ctx) [] []
45 43
46 val a : tag [Link = page] [Body] [Body] [] [] 44 val p : bodyTag []
45 val b : bodyTag []
46 val i : bodyTag []
47 val font : bodyTag [Size = int, Face = string]
48
49 val h1 : bodyTag []
50 val li : bodyTag []
51
52 val a : bodyTag [Link = page]
53
54 val form : unit -> tag [] [Body] [Form] [] []