changeset 1067:50dd937c4cb9

Bug fixes in redirect-related stuff
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Dec 2009 15:46:07 -0500
parents 740b85ef4352
children 757dbac0454d
files src/c/urweb.c src/monoize.sml src/tag.sml
diffstat 3 files changed, 10 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/urweb.c	Thu Dec 10 15:20:36 2009 -0500
+++ b/src/c/urweb.c	Thu Dec 10 15:46:07 2009 -0500
@@ -3083,7 +3083,6 @@
     char *s2;
     for (++s; s2 = strchr(s, '\n'); s = s2+1) {
       *s2 = 0;
-      printf("Line: %s\n", s);
       if (!strncmp(s, "Set-Cookie: ", 12)) {
         uw_write_header(ctx, s);
         uw_write_header(ctx, "\n");
--- a/src/monoize.sml	Thu Dec 10 15:20:36 2009 -0500
+++ b/src/monoize.sml	Thu Dec 10 15:46:07 2009 -0500
@@ -395,8 +395,6 @@
     else
         str (Char.toUpper (String.sub (s, 0))) ^ String.extract (s, 1, NONE)
 
-val inTag = ref false
-
 fun fooifyExp fk env =
     let
         fun fooify fm (e, tAll as (t, loc)) =
@@ -2480,9 +2478,6 @@
              tag), _),
             xml) =>
             let
-                val inT = !inTag
-                val () = inTag := true
-
                 fun getTag' (e, _) =
                     case e of
                         L.EFfi ("Basis", tag) => (tag, [])
@@ -2918,7 +2913,6 @@
 
                    | "tabl" => normal ("table", NONE, NONE)
                    | _ => normal (tag, NONE, NONE))
-                before inTag := inT
             end
 
           | L.EApp ((L.ECApp (
@@ -3144,6 +3138,13 @@
                  fm)
             end
 
+          | L.EFfiApp ("Basis", "url", [e]) =>
+            let
+                val (e, fm) = monoExp (env, st, fm) e
+            in
+                urlifyExp env fm (e, dummyTyp)
+            end
+
           | L.EApp (e1, e2) =>
             let
                 val (e1, fm) = monoExp (env, st, fm) e1
@@ -3223,10 +3224,7 @@
                                                  fm es
                 val e = (L'.EClosure (n, es), loc)
             in
-                if !inTag then
-                    (e, fm)
-                else
-                    urlifyExp env fm (e, dummyTyp)
+                (e, fm)
             end
 
           | L.ELet (x, t, e1, e2) =>
--- a/src/tag.sml	Thu Dec 10 15:20:36 2009 -0500
+++ b/src/tag.sml	Thu Dec 10 15:46:07 2009 -0500
@@ -169,7 +169,7 @@
             let
                 val (e, s) = tagIt (e, Link, "Url", s)
             in
-                (#1 e, s)
+                (EFfiApp ("Basis", "url", [e]), s)
             end
 
           | EApp ((ENamed n, _), e') =>
@@ -181,7 +181,7 @@
                     let
                         val (e, s) = tagIt (e', Link, "Url", s)
                     in
-                        (#1 e, s)
+                        (EFfiApp ("Basis", "url", [e]), s)
                     end
                   | _ => (e, s)
             end