diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-22 18:46:04 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-22 18:46:04 -0400 |
commit | 6c5b16aa47eeb84d5f6ee9fc6cb265424e63f74c (patch) | |
tree | 51ff2855edcd09b36ce549bdb2bf91cd4d2c5caa /tests | |
parent | cedc70524a84b860f438078c8abc6f1aa0557994 (diff) |
Meta-programming forms
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gform.lac | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/gform.lac b/tests/gform.lac index 51df468c..4ce75e3e 100644 --- a/tests/gform.lac +++ b/tests/gform.lac @@ -19,12 +19,21 @@ functor F (M : S) : S' where con rs = M.rs = struct </body></html> val page = fn () => <html><body> - + <lform> + {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></lform> + [rs]} + + <submit action={handler}/> + </lform> </body></html> end structure M = F(struct - con rs = [] + con rs = [A, B, C] end) open M |