aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-20 10:11:16 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-20 10:11:16 -0400
commitd76bf83a5e8eb9a0b4e194f83cfadd8d55c00dfd (patch)
tree8e7af4b896c122b1d91b8abb2024ea8f115f5d0e /lib
parent1500c4fedf82243dfbee5fff8ea392905f0a8c80 (diff)
Form binding parameters threaded through
Diffstat (limited to 'lib')
-rw-r--r--lib/basis.lig49
1 files changed, 28 insertions, 21 deletions
diff --git a/lib/basis.lig b/lib/basis.lig
index 189b0350..86b01992 100644
--- a/lib/basis.lig
+++ b/lib/basis.lig
@@ -5,35 +5,42 @@ type string
type unit = {}
-con tag :: {Type} -> {Unit} -> {Unit} -> Type
+con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type
-con xml :: {Unit} -> Type
-val cdata : ctx ::: {Unit} -> string -> xml ctx
+con xml :: {Unit} -> {Type} -> {Type} -> Type
+val cdata : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> string -> xml ctx use bind
val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent
- -> outer ::: {Unit} -> inner ::: {Unit}
+ -> ctxOuter ::: {Unit} -> ctxInner ::: {Unit}
+ -> useOuter ::: {Type} -> useInner ::: {Type} -> useOuter ~ useInner
+ -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner
-> $attrsGiven
- -> tag (attrsGiven ++ attrsAbsent) outer inner
- -> xml inner
- -> xml outer
-val join : shared :: {Unit}
- -> ctx1 ::: {Unit} -> ctx1 ~ shared
- -> ctx2 ::: {Unit} -> ctx2 ~ shared
- -> xml (shared ++ ctx1) -> xml (shared ++ ctx2) -> xml shared
+ -> tag (attrsGiven ++ attrsAbsent) ctxOuter ctxInner useOuter bindOuter
+ -> xml ctxInner useInner bindInner
+ -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner)
+val join : sharedCtx :: {Unit}
+ -> ctx1 ::: {Unit} -> ctx1 ~ sharedCtx
+ -> ctx2 ::: {Unit} -> ctx2 ~ sharedCtx
+ -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type}
+ -> use1 ~ bind1 -> bind1 ~ bind2
+ -> xml (sharedCtx ++ ctx1) use1 bind1
+ -> xml (sharedCtx ++ ctx2) (use1 ++ bind1) bind2
+ -> xml sharedCtx use1 (bind1 ++ bind2)
con xhtml = xml [Html]
+con page = xhtml [] []
-val head : tag [] [Html] [Head]
-val title : tag [] [Head] []
+val head : tag [] [Html] [Head] [] []
+val title : tag [] [Head] [] [] []
-val body : tag [] [Html] [Body]
-val p : tag [] [Body] [Body]
-val b : tag [] [Body] [Body]
-val i : tag [] [Body] [Body]
-val font : tag [Size = int, Face = string] [Body] [Body]
+val body : tag [] [Html] [Body] [] []
+val p : tag [] [Body] [Body] [] []
+val b : tag [] [Body] [Body] [] []
+val i : tag [] [Body] [Body] [] []
+val font : tag [Size = int, Face = string] [Body] [Body] [] []
-val h1 : tag [] [Body] [Body]
-val li : tag [] [Body] [Body]
+val h1 : tag [] [Body] [Body] [] []
+val li : tag [] [Body] [Body] [] []
-val a : tag [Link = xhtml] [Body] [Body]
+val a : tag [Link = page] [Body] [Body] [] []