diff src/effectize.sml @ 1183:9d3ccb8b39ac

safeGet
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Mar 2010 18:28:44 -0500
parents 72670131dace
children b106ca8200b1
line wrap: on
line diff
--- a/src/effectize.sml	Tue Mar 09 17:50:42 2010 -0500
+++ b/src/effectize.sml	Tue Mar 09 18:28:44 2010 -0500
@@ -143,7 +143,12 @@
               | DExport (Link, n, _) =>
                 (case IM.find (writers, n) of
                      NONE => ()
-                   | SOME (loc, s) => ErrorMsg.errorAt loc ("A link (" ^ s ^ ") could cause side effects; try implementing it with a form instead");
+                   | SOME (loc, s) =>
+                     if Settings.isSafeGet s then
+                         ()
+                     else
+                         ErrorMsg.errorAt loc ("A link (" ^ s
+                                               ^ ") could cause side effects; try implementing it with a form instead");
                  ((DExport (Link, n, IM.inDomain (pushers, n)), #2 d), evs))
               | DExport (Action _, n, _) =>
                 ((DExport (Action (if IM.inDomain (writers, n) then