diff src/sql.sml @ 2048:4d64af730e35

Differentiate between HTML and normal string literals
author Adam Chlipala <adam@chlipala.net>
date Fri, 01 Aug 2014 15:44:17 -0400
parents cb0f05bdc183
children ef766ef6e242
line wrap: on
line diff
--- a/src/sql.sml	Fri Aug 01 11:43:44 2014 -0400
+++ b/src/sql.sml	Fri Aug 01 15:44:17 2014 -0400
@@ -47,7 +47,7 @@
 
 fun chunkify e =
     case #1 e of
-        EPrim (Prim.String s) => [String s]
+        EPrim (Prim.String (_, s)) => [String s]
       | EStrcat (e1, e2) =>
         let
             val chs1 = chunkify e1
@@ -248,7 +248,7 @@
                               (Option.map Prim.Int o Int64.fromString))
                        (opt (const "::int8"))) #1,
           wrap (follow (opt (const "E")) (follow string (opt (const "::text"))))
-               (Prim.String o #1 o #2)]
+               ((fn s => Prim.String (Prim.Normal, s)) o #1 o #2)]
 
 fun known' chs =
     case chs of
@@ -263,9 +263,9 @@
         else
             NONE
       | Exp (ECase (e, [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, NONE), _),
-                         (EPrim (Prim.String "TRUE"), _)),
+                         (EPrim (Prim.String (Prim.Normal, "TRUE")), _)),
                         ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, NONE), _),
-                         (EPrim (Prim.String "FALSE"), _))], _), _) :: chs =>
+                         (EPrim (Prim.String (Prim.Normal, "FALSE")), _))], _), _) :: chs =>
         SOME (e, chs)
                           
       | _ => NONE