Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1182:0b1d666bddb4 | 1183:9d3ccb8b39ac |
---|---|
141 (d, loop (writers, readers, pushers)) | 141 (d, loop (writers, readers, pushers)) |
142 end | 142 end |
143 | DExport (Link, n, _) => | 143 | DExport (Link, n, _) => |
144 (case IM.find (writers, n) of | 144 (case IM.find (writers, n) of |
145 NONE => () | 145 NONE => () |
146 | SOME (loc, s) => ErrorMsg.errorAt loc ("A link (" ^ s ^ ") could cause side effects; try implementing it with a form instead"); | 146 | SOME (loc, s) => |
147 if Settings.isSafeGet s then | |
148 () | |
149 else | |
150 ErrorMsg.errorAt loc ("A link (" ^ s | |
151 ^ ") could cause side effects; try implementing it with a form instead"); | |
147 ((DExport (Link, n, IM.inDomain (pushers, n)), #2 d), evs)) | 152 ((DExport (Link, n, IM.inDomain (pushers, n)), #2 d), evs)) |
148 | DExport (Action _, n, _) => | 153 | DExport (Action _, n, _) => |
149 ((DExport (Action (if IM.inDomain (writers, n) then | 154 ((DExport (Action (if IM.inDomain (writers, n) then |
150 if IM.inDomain (readers, n) then | 155 if IM.inDomain (readers, n) then |
151 ReadCookieWrite | 156 ReadCookieWrite |