diff src/compiler.sml @ 1171:7a2a7a8f9cab

benignEffectful
author Adam Chlipala <adamc@hcoop.net>
date Sat, 27 Feb 2010 16:49:11 -0500
parents 52c6ac6a59f1
children 983d9b38abc7
line wrap: on
line diff
--- a/src/compiler.sml	Sat Feb 27 14:57:57 2010 -0500
+++ b/src/compiler.sml	Sat Feb 27 16:49:11 2010 -0500
@@ -48,6 +48,7 @@
      scripts : string list,
      clientToServer : Settings.ffi list,
      effectful : Settings.ffi list,
+     benignEffectful : Settings.ffi list,
      clientOnly : Settings.ffi list,
      serverOnly : Settings.ffi list,
      jsFuncs : (Settings.ffi * string) list,
@@ -212,7 +213,7 @@
 
 fun p_job ({prefix, database, exe, sql, sources, debug, profile,
             timeout, ffi, link, headers, scripts,
-            clientToServer, effectful, clientOnly, serverOnly, jsFuncs, ...} : job) =
+            clientToServer, effectful, benignEffectful, clientOnly, serverOnly, jsFuncs, ...} : job) =
     let
         open Print.PD
         open Print
@@ -248,6 +249,7 @@
              p_list_sep (box []) (fn s => box [string "Link", space, string s, newline]) link,
              p_ffi "ClientToServer" clientToServer,
              p_ffi "Effectful" effectful,
+             p_ffi "BenignEffectful" benignEffectful,
              p_ffi "ClientOnly" clientOnly,
              p_ffi "ServerOnly" serverOnly,
              p_list_sep (box []) (fn ((m, s), s') =>
@@ -371,6 +373,7 @@
                 val scripts = ref []
                 val clientToServer = ref []
                 val effectful = ref []
+                val benignEffectful = ref []
                 val clientOnly = ref []
                 val serverOnly = ref []
                 val jsFuncs = ref []
@@ -399,6 +402,7 @@
                             scripts = rev (!scripts),
                             clientToServer = rev (!clientToServer),
                             effectful = rev (!effectful),
+                            benignEffectful = rev (!benignEffectful),
                             clientOnly = rev (!clientOnly),
                             serverOnly = rev (!serverOnly),
                             jsFuncs = rev (!jsFuncs),
@@ -439,6 +443,7 @@
                             scripts = #scripts old @ #scripts new,
                             clientToServer = #clientToServer old @ #clientToServer new,
                             effectful = #effectful old @ #effectful new,
+                            benignEffectful = #benignEffectful old @ #benignEffectful new,
                             clientOnly = #clientOnly old @ #clientOnly new,
                             serverOnly = #serverOnly old @ #serverOnly new,
                             jsFuncs = #jsFuncs old @ #jsFuncs new,
@@ -564,6 +569,7 @@
                               | "script" => scripts := arg :: !scripts
                               | "clientToServer" => clientToServer := ffiS () :: !clientToServer
                               | "effectful" => effectful := ffiS () :: !effectful
+                              | "benignEffectful" => benignEffectful := ffiS () :: !benignEffectful
                               | "clientOnly" => clientOnly := ffiS () :: !clientOnly
                               | "serverOnly" => serverOnly := ffiS () :: !serverOnly
                               | "jsFunc" => jsFuncs := ffiM () :: !jsFuncs
@@ -626,6 +632,7 @@
                 Settings.setScripts (#scripts job);
                 Settings.setClientToServer (#clientToServer job);
                 Settings.setEffectful (#effectful job);
+                Settings.setBenignEffectful (#benignEffectful job);
                 Settings.setClientOnly (#clientOnly job);
                 Settings.setServerOnly (#serverOnly job);
                 Settings.setJsFuncs (#jsFuncs job);