adamc@56: type int adamc@56: type float adamc@56: type string adamc@91: adamc@119: type unit = {} adamc@119: adamc@91: adamc@139: con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type adamc@91: adamc@91: adamc@139: con xml :: {Unit} -> {Type} -> {Type} -> Type adamc@139: val cdata : ctx ::: {Unit} -> use ::: {Type} -> bind ::: {Type} -> string -> xml ctx use bind adamc@104: val tag : attrsGiven ::: {Type} -> attrsAbsent ::: {Type} -> attrsGiven ~ attrsAbsent adamc@139: -> ctxOuter ::: {Unit} -> ctxInner ::: {Unit} adamc@139: -> useOuter ::: {Type} -> useInner ::: {Type} -> useOuter ~ useInner adamc@139: -> bindOuter ::: {Type} -> bindInner ::: {Type} -> bindOuter ~ bindInner adamc@104: -> $attrsGiven adamc@139: -> tag (attrsGiven ++ attrsAbsent) ctxOuter ctxInner useOuter bindOuter adamc@139: -> xml ctxInner useInner bindInner adamc@139: -> xml ctxOuter (useOuter ++ useInner) (bindOuter ++ bindInner) adamc@139: val join : sharedCtx :: {Unit} adamc@139: -> ctx1 ::: {Unit} -> ctx1 ~ sharedCtx adamc@139: -> ctx2 ::: {Unit} -> ctx2 ~ sharedCtx adamc@139: -> use1 ::: {Type} -> bind1 ::: {Type} -> bind2 ::: {Type} adamc@139: -> use1 ~ bind1 -> bind1 ~ bind2 adamc@139: -> xml (sharedCtx ++ ctx1) use1 bind1 adamc@139: -> xml (sharedCtx ++ ctx2) (use1 ++ bind1) bind2 adamc@139: -> xml sharedCtx use1 (bind1 ++ bind2) adamc@91: adamc@91: adamc@110: con xhtml = xml [Html] adamc@139: con page = xhtml [] [] adamc@110: adamc@139: val head : tag [] [Html] [Head] [] [] adamc@139: val title : tag [] [Head] [] [] [] adamc@93: adamc@139: val body : tag [] [Html] [Body] [] [] adamc@139: val p : tag [] [Body] [Body] [] [] adamc@139: val b : tag [] [Body] [Body] [] [] adamc@139: val i : tag [] [Body] [Body] [] [] adamc@139: val font : tag [Size = int, Face = string] [Body] [Body] [] [] adamc@110: adamc@139: val h1 : tag [] [Body] [Body] [] [] adamc@139: val li : tag [] [Body] [Body] [] [] adamc@119: adamc@139: val a : tag [Link = page] [Body] [Body] [] []