Mercurial > urweb
changeset 148:15e8b9775539
gform in proper order
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 22 Jul 2008 19:12:25 -0400 |
parents | eb16f2aadbe9 |
children | 7420fa18d657 |
files | lib/basis.lig src/monoize.sml tests/gform.lac |
diffstat | 3 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/basis.lig Tue Jul 22 18:46:04 2008 -0400 +++ b/lib/basis.lig Tue Jul 22 19:12:25 2008 -0400 @@ -24,7 +24,10 @@ -> xml ctx use1 bind1 -> xml ctx (use1 ++ bind1) bind2 -> xml ctx use1 (bind1 ++ bind2) - +val useMore : ctx ::: {Unit} -> use1 ::: {Type} -> use2 ::: {Type} -> bind ::: {Type} + -> use1 ~ use2 + -> xml ctx use1 bind + -> xml ctx (use1 ++ use2) bind con xhtml = xml [Html] con page = xhtml [] []
--- a/src/monoize.sml Tue Jul 22 18:46:04 2008 -0400 +++ b/src/monoize.sml Tue Jul 22 19:12:25 2008 -0400 @@ -351,6 +351,17 @@ (L'.EPrim (Prim.String "</form>"), loc)), loc)), loc) end + | L.EApp ((L.ECApp ( + (L.ECApp ( + (L.ECApp ( + (L.ECApp ( + (L.EFfi ("Basis", "useMore"), _), _), _), + _), _), + _), _), + _), _), + xml) => monoExp env xml + + | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc) | L.EAbs (x, dom, ran, e) => (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc)
--- a/tests/gform.lac Tue Jul 22 18:46:04 2008 -0400 +++ b/tests/gform.lac Tue Jul 22 19:12:25 2008 -0400 @@ -23,7 +23,7 @@ {fold [fn rs :: {Unit} => xml lform [] (stringify rs)] (fn nm :: Name => fn u :: Unit => fn rest :: {Unit} => fn frag : xml lform [] (stringify rest) => - <lform><li>{frag} <textbox{nm}/></li></lform>) + <lform><li> <textbox{nm}/></li> {useMore frag}</lform>) <lform></lform> [rs]}