From ba73bb0f4dc54d67c55f0d8c74ebe8ac62344217 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 9 Mar 2010 18:28:44 -0500 Subject: safeGet --- src/effectize.sml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/effectize.sml') 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 -- cgit v1.2.3