comparison src/monoize.sml @ 603:b1064de2b1f9

dlist example working
author Adam Chlipala <adamc@hcoop.net>
date Fri, 16 Jan 2009 15:49:10 -0500
parents 7c3c21eb5b4c
children 5145181b02fa
comparison
equal deleted inserted replaced
602:1d34d916c206 603:b1064de2b1f9
1908 (case attrs of 1908 (case attrs of
1909 [("Signal", (L'.EApp ((L'.EAbs (_, _, _, (L'.ESignalReturn (L'.ERel 0, _), _)), _), 1909 [("Signal", (L'.EApp ((L'.EAbs (_, _, _, (L'.ESignalReturn (L'.ERel 0, _), _)), _),
1910 e), _), _)] => (e, fm) 1910 e), _), _)] => (e, fm)
1911 | [("Signal", e, _)] => 1911 | [("Signal", e, _)] =>
1912 ((L'.EStrcat 1912 ((L'.EStrcat
1913 ((L'.EPrim (Prim.String "<script>dyn("), loc), 1913 ((L'.EPrim (Prim.String "<span><script type=\"text/javascript\">dyn("), loc),
1914 (L'.EStrcat ((L'.EJavaScript (L'.Script, e, NONE), loc), 1914 (L'.EStrcat ((L'.EJavaScript (L'.Script, e, NONE), loc),
1915 (L'.EPrim (Prim.String ")</script>"), loc)), loc)), loc), 1915 (L'.EPrim (Prim.String ")</script></span>"), loc)), loc)), loc),
1916 fm) 1916 fm)
1917 | _ => raise Fail "Monoize: Bad dyn attributes") 1917 | _ => raise Fail "Monoize: Bad dyn attributes")
1918 1918
1919 | "submit" => normal ("input type=\"submit\"", NONE, NONE) 1919 | "submit" => normal ("input type=\"submit\"", NONE, NONE)
1920 | "button" => normal ("input type=\"submit\"", NONE, NONE) 1920 | "button" => normal ("input type=\"submit\"", NONE, NONE)
1930 ((L'.EStrcat (ts, 1930 ((L'.EStrcat (ts,
1931 (L'.EPrim (Prim.String (" name=\"" ^ name ^ "\"/>")), 1931 (L'.EPrim (Prim.String (" name=\"" ^ name ^ "\"/>")),
1932 loc)), loc), fm) 1932 loc)), loc), fm)
1933 end 1933 end
1934 | SOME (_, src, _) => 1934 | SOME (_, src, _) =>
1935 (strcat [str "<script>inp(\"input\",", 1935 (strcat [str "<script type=\"text/javascript\">inp(\"input\",",
1936 (L'.EJavaScript (L'.Script, src, NONE), loc), 1936 (L'.EJavaScript (L'.Script, src, NONE), loc),
1937 str ")</script>"], 1937 str ")</script>"],
1938 fm)) 1938 fm))
1939 | _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs); 1939 | _ => (Print.prefaces "Targs" (map (fn t => ("T", CorePrint.p_con env t)) targs);
1940 raise Fail "No name passed to textbox tag")) 1940 raise Fail "No name passed to textbox tag"))
2000 ((L'.EStrcat (ts, 2000 ((L'.EStrcat (ts,
2001 (L'.EPrim (Prim.String "/>"), loc)), 2001 (L'.EPrim (Prim.String "/>"), loc)),
2002 loc), fm) 2002 loc), fm)
2003 end 2003 end
2004 | SOME (_, src, _) => 2004 | SOME (_, src, _) =>
2005 (strcat [str "<script>inp(\"input\",", 2005 (strcat [str "<script type=\"text/javascript\">inp(\"input\",",
2006 (L'.EJavaScript (L'.Script, src, NONE), loc), 2006 (L'.EJavaScript (L'.Script, src, NONE), loc),
2007 str ")</script>"], 2007 str ")</script>"],
2008 fm)) 2008 fm))
2009 2009
2010 | "option" => normal ("option", NONE, NONE) 2010 | "option" => normal ("option", NONE, NONE)