diff src/monoize.sml @ 470:7cb418e9714f

Tree demo works
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 18:49:38 -0500
parents 4efab85405be
children 20fab0e96217
line wrap: on
line diff
--- a/src/monoize.sml	Thu Nov 06 17:09:53 2008 -0500
+++ b/src/monoize.sml	Thu Nov 06 18:49:38 2008 -0500
@@ -1584,6 +1584,25 @@
             end
           | L.EFfi ("Basis", "sql_current_timestamp") => ((L'.EPrim (Prim.String "CURRENT_TIMESTAMP"), loc), fm)
 
+          | (L.ECApp (
+             (L.ECApp (
+              (L.ECApp (
+               (L.ECApp (
+                (L.EFfi ("Basis", "sql_is_null"), _), _),
+                _), _),
+               _), _),
+              _), _)) =>
+            let
+                val s = (L'.TFfi ("Basis", "string"), loc)
+                fun sc s = (L'.EPrim (Prim.String s), loc)
+            in
+                ((L'.EAbs ("s", s, s,
+                           strcat loc [sc "(",
+                                       (L'.ERel 0, loc),
+                                       sc " IS NULL)"]), loc),
+                 fm)
+            end
+
           | L.EFfiApp ("Basis", "nextval", [e]) =>
             let
                 val (e, fm) = monoExp (env, st, fm) e