diff src/rpcify.sml @ 765:a28982de5645

Successfully influenced effectful-ness status of FFI func
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 May 2009 11:27:26 -0400
parents e0dd85ea58e1
children ed06e25c70ef
line wrap: on
line diff
--- a/src/rpcify.sml	Thu Apr 30 17:15:14 2009 -0400
+++ b/src/rpcify.sml	Sat May 02 11:27:26 2009 -0400
@@ -46,23 +46,6 @@
     else
         multiLiftExpInExp (n - 1) (E.liftExpInExp 0 e)
 
-val ssBasis = SS.addList (SS.empty,
-                          ["requestHeader",
-                           "query",
-                           "dml",
-                           "nextval",
-                           "channel",
-                           "subscribe",
-                           "send"])
-
-val csBasis = SS.addList (SS.empty,
-                          ["get",
-                           "set",
-                           "alert",
-                           "recv",
-                           "sleep",
-                           "spawn"])
-
 type state = {
      cpsed : int IM.map,
      cpsed_range : con IM.map,
@@ -80,8 +63,8 @@
             U.Exp.exists {kind = fn _ => false,
                           con = fn _ => false,
                           exp = fn ENamed n => IS.member (ssids, n)
-                                 | EFfi ("Basis", x) => SS.member (basis, x)
-                                 | EFfiApp ("Basis", x, _) => SS.member (basis, x)
+                                 | EFfi x => basis x
+                                 | EFfiApp (m, x, _) => basis (m, x)
                                  | _ => false}
                          (U.Exp.map {kind = fn x => x,
                                      con = fn x => x,
@@ -110,14 +93,14 @@
                 foldl decl IS.empty file
             end
 
-        val ssids = whichIds ssBasis
-        val csids = whichIds csBasis
+        val ssids = whichIds Settings.isServerOnly
+        val csids = whichIds Settings.isClientOnly
 
         fun sideish' (basis, ids) extra =
             sideish (basis, IM.foldli (fn (id, _, ids) => IS.add (ids, id)) ids extra)
 
-        val serverSide = sideish' (ssBasis, ssids)
-        val clientSide = sideish' (csBasis, csids)
+        val serverSide = sideish' (Settings.isServerOnly, ssids)
+        val clientSide = sideish' (Settings.isClientOnly, csids)
 
         val tfuncs = foldl
                      (fn ((d, _), tfuncs) =>