diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-31 16:32:49 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-31 16:32:49 -0400 |
commit | 3b3eb1273341bcc8787ab2efa9f7fe7cfd2f9235 (patch) | |
tree | e56c6b2d2d37300801ed1b2bae91e26cb9c45c82 /src | |
parent | ddb4c1fe285a26cc46c59e6269ecac1f26c687a6 (diff) |
Changed EQuery not to use a function in its body
Diffstat (limited to 'src')
-rw-r--r-- | src/mono_util.sml | 26 | ||||
-rw-r--r-- | src/monoize.sml | 15 |
2 files changed, 21 insertions, 20 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 diff --git a/src/monoize.sml b/src/monoize.sml index f5a64545..55245074 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -519,15 +519,12 @@ fun monoExp (env, st, fm) (all as (e, loc)) = (L'.TFun (un, state), loc)), loc)), loc) - val body' = (L'.EAbs ("r", (L'.TRecord rt, loc), - (L'.TFun (state, state), loc), - (L'.EAbs ("acc", state, state, - (L'.EApp ( - (L'.EApp ( - (L'.EApp ((L'.ERel 4, loc), - (L'.ERel 1, loc)), loc), - (L'.ERel 0, loc)), loc), - (L'.ERecord [], loc)), loc)), loc)), loc) + val body' = (L'.EApp ( + (L'.EApp ( + (L'.EApp ((L'.ERel 4, loc), + (L'.ERel 1, loc)), loc), + (L'.ERel 0, loc)), loc), + (L'.ERecord [], loc)), loc) val body = (L'.EQuery {exps = exps, tables = tables, |