diff src/mono_util.sml @ 267:f31e8da68e90

Changed EQuery not to use a function in its body
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 16:32:49 -0400
parents 7e9bd70ad3ce
children 42dfb0d61cf0
line wrap: on
line diff
--- a/src/mono_util.sml	Sun Aug 31 16:26:50 2008 -0400
+++ b/src/mono_util.sml	Sun Aug 31 16:32:49 2008 -0400
@@ -31,6 +31,8 @@
 
 structure S = Search
 
+val dummyt = (TRecord [], ErrorMsg.dummySpan)
+
 structure Typ = struct
 
 open Order
@@ -243,17 +245,19 @@
                                               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