Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
266:7a7efbb3e354 | 267:f31e8da68e90 |
---|---|
28 structure MonoUtil :> MONO_UTIL = struct | 28 structure MonoUtil :> MONO_UTIL = struct |
29 | 29 |
30 open Mono | 30 open Mono |
31 | 31 |
32 structure S = Search | 32 structure S = Search |
33 | |
34 val dummyt = (TRecord [], ErrorMsg.dummySpan) | |
33 | 35 |
34 structure Typ = struct | 36 structure Typ = struct |
35 | 37 |
36 open Order | 38 open Order |
37 | 39 |
241 fn tables' => | 243 fn tables' => |
242 S.bind2 (mft state, | 244 S.bind2 (mft state, |
243 fn state' => | 245 fn state' => |
244 S.bind2 (mfe ctx query, | 246 S.bind2 (mfe ctx query, |
245 fn query' => | 247 fn query' => |
246 S.bind2 (mfe ctx body, | 248 S.bind2 (mfe (bind (bind (ctx, RelE ("r", dummyt)), |
247 fn body' => | 249 RelE ("acc", dummyt))) |
248 S.map2 (mfe ctx initial, | 250 body, |
249 fn initial' => | 251 fn body' => |
250 (EQuery {exps = exps', | 252 S.map2 (mfe ctx initial, |
251 tables = tables', | 253 fn initial' => |
252 state = state', | 254 (EQuery {exps = exps', |
253 query = query', | 255 tables = tables', |
254 body = body', | 256 state = state', |
255 initial = initial'}, | 257 query = query', |
256 loc))))))) | 258 body = body', |
259 initial = initial'}, | |
260 loc))))))) | |
257 in | 261 in |
258 mfe | 262 mfe |
259 end | 263 end |
260 | 264 |
261 fun mapfold {typ = fc, exp = fe} = | 265 fun mapfold {typ = fc, exp = fe} = |