diff options
author | Adam Chlipala <adam@chlipala.net> | 2016-12-31 15:54:06 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2016-12-31 15:54:06 -0500 |
commit | 923cc0fcad46eae0a00f7d5c8ea39e627b1aaa57 (patch) | |
tree | b1cc7a27167772b2c601b4bac8b740ea152369b5 /src/monoize.sml | |
parent | 10c0bc3c889568717ce97b6d3bda000b3fd46227 (diff) |
Use 'id' attribute for <form>
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 86f2b4a5..ddf6cd4c 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -3657,9 +3657,10 @@ fun monoExp (env, st, fm) (all as (e, loc)) = end | L.EApp ( - (L.EApp ((L.ECApp ( - (L.ECApp ((L.EFfi ("Basis", "form"), _), _), _), - (L.CRecord (_, fields), _)), _), + (L.EApp ((L.EApp ((L.ECApp ( + (L.ECApp ((L.EFfi ("Basis", "form"), _), _), _), + (L.CRecord (_, fields), _)), _), + id), _), class), _), xml) => let @@ -3793,6 +3794,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) = action val stt = (L'.TFfi ("Basis", "string"), loc) + val (id, fm) = monoExp (env, st, fm) id val (class, fm) = monoExp (env, st, fm) class val action = (L'.EStrcat (action, (L'.ECase (class, @@ -3806,8 +3808,17 @@ fun monoExp (env, st, fm) (all as (e, loc)) = result = stt}), loc)), loc) in ((L'.EStrcat ((L'.EStrcat (strH "<form method=\"post\"", - (L'.EStrcat (action, - strH ">"), loc)), loc), + (L'.EStrcat ((L'.ECase (id, + [((L'.PNone stt, loc), + strH ""), + ((L'.PSome (stt, (L'.PVar ("id", stt), loc)), loc), + (L'.EStrcat (strH " id=\"", + (L'.EStrcat ((L'.ERel 0, loc), + strH "\""), loc)), loc))], + {disc = (L'.TOption stt, loc), + result = stt}), loc), + (L'.EStrcat (action, + strH ">"), loc)), loc)), loc), (L'.EStrcat (xml, strH "</form>"), loc)), loc), fm) |