comparison src/tag.sml @ 1936:6745eafff617

Start SQL transactions as read-only when possible, based on conservative program analysis
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Dec 2013 17:42:48 -0500
parents a1380fc15cb5
children f1485ed65d6c
comparison
equal deleted inserted replaced
1935:fda9d5af69e7 1936:6745eafff617
143 in 143 in
144 (((CName newAttr, loc), e', t), s) 144 (((CName newAttr, loc), e', t), s)
145 end 145 end
146 in 146 in
147 case x of 147 case x of
148 (CName "Link", _) => tagIt' (Link, "Link") 148 (CName "Link", _) => tagIt' (Link ReadWrite, "Link")
149 | (CName "Action", _) => tagIt' (Action ReadWrite, "Action") 149 | (CName "Action", _) => tagIt' (Action ReadWrite, "Action")
150 | _ => ((x, e, t), s) 150 | _ => ((x, e, t), s)
151 end) 151 end)
152 s xets 152 s xets
153 in 153 in
178 178
179 | EFfiApp ("Basis", "url", [((ERel 0, _), _)]) => (e, s) 179 | EFfiApp ("Basis", "url", [((ERel 0, _), _)]) => (e, s)
180 180
181 | EFfiApp ("Basis", "url", [(e, t)]) => 181 | EFfiApp ("Basis", "url", [(e, t)]) =>
182 let 182 let
183 val (e, s) = tagIt (e, Link, "Url", s) 183 val (e, s) = tagIt (e, Link ReadWrite, "Url", s)
184 in 184 in
185 (EFfiApp ("Basis", "url", [(e, t)]), s) 185 (EFfiApp ("Basis", "url", [(e, t)]), s)
186 end 186 end
187 187
188 | EFfiApp ("Basis", "effectfulUrl", [((ERel 0, _), _)]) => (e, s) 188 | EFfiApp ("Basis", "effectfulUrl", [((ERel 0, _), _)]) => (e, s)
199 val (_, _, eo, _) = E.lookupENamed env n 199 val (_, _, eo, _) = E.lookupENamed env n
200 in 200 in
201 case eo of 201 case eo of
202 SOME (EAbs (_, _, _, (EFfiApp ("Basis", "url", [((ERel 0, _), t)]), _)), _) => 202 SOME (EAbs (_, _, _, (EFfiApp ("Basis", "url", [((ERel 0, _), t)]), _)), _) =>
203 let 203 let
204 val (e, s) = tagIt (e', Link, "Url", s) 204 val (e, s) = tagIt (e', Link ReadWrite, "Url", s)
205 in 205 in
206 (EFfiApp ("Basis", "url", [(e, t)]), s) 206 (EFfiApp ("Basis", "url", [(e, t)]), s)
207 end 207 end
208 | _ => (e, s) 208 | _ => (e, s)
209 end 209 end