Mercurial > urweb
comparison src/mono_util.sml @ 271:42dfb0d61cf0
'database' declaration threaded through compiler
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 02 Sep 2008 10:51:41 -0400 |
parents | f31e8da68e90 |
children | 09c66a30ef32 |
comparison
equal
deleted
inserted
replaced
270:b9b02613c0c2 | 271:42dfb0d61cf0 |
---|---|
340 end | 340 end |
341 | DExport (ek, s, n, ts) => | 341 | DExport (ek, s, n, ts) => |
342 S.map2 (ListUtil.mapfold mft ts, | 342 S.map2 (ListUtil.mapfold mft ts, |
343 fn ts' => | 343 fn ts' => |
344 (DExport (ek, s, n, ts'), loc)) | 344 (DExport (ek, s, n, ts'), loc)) |
345 | DDatabase _ => S.return2 dAll | |
345 | 346 |
346 and mfvi ctx (x, n, t, e, s) = | 347 and mfvi ctx (x, n, t, e, s) = |
347 S.bind2 (mft t, | 348 S.bind2 (mft t, |
348 fn t' => | 349 fn t' => |
349 S.map2 (mfe ctx e, | 350 S.map2 (mfe ctx e, |
402 end | 403 end |
403 | DVal (x, n, t, e, s) => bind (ctx, NamedE (x, n, t, SOME e, s)) | 404 | DVal (x, n, t, e, s) => bind (ctx, NamedE (x, n, t, SOME e, s)) |
404 | DValRec vis => foldl (fn ((x, n, t, e, s), ctx) => | 405 | DValRec vis => foldl (fn ((x, n, t, e, s), ctx) => |
405 bind (ctx, NamedE (x, n, t, NONE, s))) ctx vis | 406 bind (ctx, NamedE (x, n, t, NONE, s))) ctx vis |
406 | DExport _ => ctx | 407 | DExport _ => ctx |
408 | DDatabase _ => ctx | |
407 in | 409 in |
408 S.map2 (mff ctx' ds', | 410 S.map2 (mff ctx' ds', |
409 fn ds' => | 411 fn ds' => |
410 d' :: ds') | 412 d' :: ds') |
411 end) | 413 end) |