Mercurial > urweb
comparison src/mono_util.sml @ 569:162d5308e34f
Successfully generated a page element from a signal
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 20 Dec 2008 16:19:26 -0500 |
parents | 55fc747a67dc |
children | 57018f21cd5c |
comparison
equal
deleted
inserted
replaced
568:55fc747a67dc | 569:162d5308e34f |
---|---|
321 (EUnurlify (e', t'), loc))) | 321 (EUnurlify (e', t'), loc))) |
322 | EJavaScript (m, e) => | 322 | EJavaScript (m, e) => |
323 S.map2 (mfe ctx e, | 323 S.map2 (mfe ctx e, |
324 fn e' => | 324 fn e' => |
325 (EJavaScript (m, e'), loc)) | 325 (EJavaScript (m, e'), loc)) |
326 | |
326 | ESignalReturn e => | 327 | ESignalReturn e => |
327 S.map2 (mfe ctx e, | 328 S.map2 (mfe ctx e, |
328 fn e' => | 329 fn e' => |
329 (ESignalReturn e', loc)) | 330 (ESignalReturn e', loc)) |
330 in | 331 in |
419 fn ts' => | 420 fn ts' => |
420 (DExport (ek, s, n, ts'), loc)) | 421 (DExport (ek, s, n, ts'), loc)) |
421 | DTable _ => S.return2 dAll | 422 | DTable _ => S.return2 dAll |
422 | DSequence _ => S.return2 dAll | 423 | DSequence _ => S.return2 dAll |
423 | DDatabase _ => S.return2 dAll | 424 | DDatabase _ => S.return2 dAll |
425 | DJavaScript _ => S.return2 dAll | |
424 | 426 |
425 and mfvi ctx (x, n, t, e, s) = | 427 and mfvi ctx (x, n, t, e, s) = |
426 S.bind2 (mft t, | 428 S.bind2 (mft t, |
427 fn t' => | 429 fn t' => |
428 S.map2 (mfe ctx e, | 430 S.map2 (mfe ctx e, |
499 bind (ctx, NamedE (x, n, t, NONE, s))) ctx vis | 501 bind (ctx, NamedE (x, n, t, NONE, s))) ctx vis |
500 | DExport _ => ctx | 502 | DExport _ => ctx |
501 | DTable _ => ctx | 503 | DTable _ => ctx |
502 | DSequence _ => ctx | 504 | DSequence _ => ctx |
503 | DDatabase _ => ctx | 505 | DDatabase _ => ctx |
506 | DJavaScript _ => ctx | |
504 in | 507 in |
505 S.map2 (mff ctx' ds', | 508 S.map2 (mff ctx' ds', |
506 fn ds' => | 509 fn ds' => |
507 d' :: ds') | 510 d' :: ds') |
508 end) | 511 end) |
546 | DVal (_, n, _, _, _) => Int.max (n, count) | 549 | DVal (_, n, _, _, _) => Int.max (n, count) |
547 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis | 550 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis |
548 | DExport _ => count | 551 | DExport _ => count |
549 | DTable _ => count | 552 | DTable _ => count |
550 | DSequence _ => count | 553 | DSequence _ => count |
551 | DDatabase _ => count) 0 | 554 | DDatabase _ => count |
555 | DJavaScript _ => count) 0 | |
552 | 556 |
553 end | 557 end |
554 | 558 |
555 end | 559 end |