summaryrefslogtreecommitdiff
path: root/src/effectize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2010-03-09 18:28:44 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2010-03-09 18:28:44 -0500
commitba73bb0f4dc54d67c55f0d8c74ebe8ac62344217 (patch)
treecfae7f68e88476d305e0b36b40583cb81a98b2da /src/effectize.sml
parent886cb3fa5ae08b3012411dd1243ceace4406978a (diff)
safeGet
Diffstat (limited to 'src/effectize.sml')
-rw-r--r--src/effectize.sml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/effectize.sml b/src/effectize.sml
index 1685fbe9..7f148476 100644
--- a/src/effectize.sml
+++ b/src/effectize.sml
@@ -143,7 +143,12 @@ fun effectize file =
| 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