diff src/jscomp.sml @ 1385:449a12b82db7

Client-side redirects
author Adam Chlipala <adam@chlipala.net>
date Thu, 06 Jan 2011 14:25:42 -0500
parents 02fc16faecf3
children 82b204f20026
line wrap: on
line diff
--- a/src/jscomp.sml	Thu Jan 06 12:49:14 2011 -0500
+++ b/src/jscomp.sml	Thu Jan 06 14:25:42 2011 -0500
@@ -875,7 +875,17 @@
                           | ENextval _ => unsupported "Nextval"
                           | ESetval _ => unsupported "Nextval"
                           | EReturnBlob _ => unsupported "EReturnBlob"
-                          | ERedirect _ => unsupported "ERedirect"
+
+                          | ERedirect (e, _) =>
+                            let
+                                val (e, st) = jsE inner (e, st)
+                            in
+                                (strcat [str "{c:\"f\",f:\"redirect\",a:cons(",
+                                         e,
+                                         str ",null)}"],
+                                 st)
+                            end
+
                           | EUnurlify (_, _, true) => unsupported "EUnurlify"
 
                           | EUnurlify (e, t, false) =>