summaryrefslogtreecommitdiff
path: root/src/mono_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 16:32:49 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-31 16:32:49 -0400
commit3b3eb1273341bcc8787ab2efa9f7fe7cfd2f9235 (patch)
treee56c6b2d2d37300801ed1b2bae91e26cb9c45c82 /src/mono_util.sml
parentddb4c1fe285a26cc46c59e6269ecac1f26c687a6 (diff)
Changed EQuery not to use a function in its body
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r--src/mono_util.sml26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml
index 0b2817f1..5ccaf16c 100644
--- a/src/mono_util.sml
+++ b/src/mono_util.sml
@@ -31,6 +31,8 @@ open Mono
structure S = Search
+val dummyt = (TRecord [], ErrorMsg.dummySpan)
+
structure Typ = struct
open Order
@@ -243,17 +245,19 @@ fun mapfoldB {typ = fc, exp = fe, bind} =
fn state' =>
S.bind2 (mfe ctx query,
fn query' =>
- S.bind2 (mfe ctx body,
- fn body' =>
- S.map2 (mfe ctx initial,
- fn initial' =>
- (EQuery {exps = exps',
- tables = tables',
- state = state',
- query = query',
- body = body',
- initial = initial'},
- loc)))))))
+ S.bind2 (mfe (bind (bind (ctx, RelE ("r", dummyt)),
+ RelE ("acc", dummyt)))
+ body,
+ fn body' =>
+ S.map2 (mfe ctx initial,
+ fn initial' =>
+ (EQuery {exps = exps',
+ tables = tables',
+ state = state',
+ query = query',
+ body = body',
+ initial = initial'},
+ loc)))))))
in
mfe
end