summaryrefslogtreecommitdiff
path: root/src/mono_util.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r--src/mono_util.sml23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml
index fd80c64f..ba10ad32 100644
--- a/src/mono_util.sml
+++ b/src/mono_util.sml
@@ -314,7 +314,7 @@ fun mapfoldB {typ = fc, exp = fe, bind} =
fn es' =>
(EClosure (n, es'), loc))
- | EQuery {exps, tables, state, query, body, initial} =>
+ | EQuery {exps, tables, state, query, body, initial, sqlcacheInfo} =>
S.bind2 (ListUtil.mapfold (fn (x, t) =>
S.map2 (mft t,
fn t' => (x, t'))) exps,
@@ -334,15 +334,20 @@ fun mapfoldB {typ = fc, exp = fe, bind} =
RelE ("acc", dummyt)))
body,
fn body' =>
- S.map2 (mfe ctx initial,
+ (* ASK: is this the right thing to do? *)
+ S.bind2 (mfe ctx initial,
fn initial' =>
- (EQuery {exps = exps',
- tables = tables',
- state = state',
- query = query',
- body = body',
- initial = initial'},
- loc)))))))
+ S.map2 (mfe (bind (ctx, RelE ("queryResult", dummyt)))
+ sqlcacheInfo,
+ fn sqlcacheInfo' =>
+ (EQuery {exps = exps',
+ tables = tables',
+ state = state',
+ query = query',
+ body = body',
+ initial = initial',
+ sqlcacheInfo = sqlcacheInfo},
+ loc))))))))
| EDml (e, fm) =>
S.map2 (mfe ctx e,