Mercurial > urweb
comparison src/mono_reduce.sml @ 995:166ea3944b91
Versioned1 demo working
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 06 Oct 2009 17:36:45 -0400 |
parents | 8fe576c0bee9 |
children | 34ba25d6af3b |
comparison
equal
deleted
inserted
replaced
994:7932d577cf78 | 995:166ea3944b91 |
---|---|
378 if n = d then | 378 if n = d then |
379 [UseRel, Unsure] | 379 [UseRel, Unsure] |
380 else | 380 else |
381 [Unsure]) | 381 [Unsure]) |
382 | EApp (f, x) => | 382 | EApp (f, x) => |
383 unravel (#1 f, passed + 1, summarize d x @ ls) | 383 unravel (#1 f, passed + 1, List.revAppend (summarize d x, |
384 ls)) | |
384 | _ => [Unsure] | 385 | _ => [Unsure] |
385 in | 386 in |
386 unravel (e, 0, []) | 387 unravel (e, 0, []) |
387 end | 388 end |
388 | 389 |
582 val effs_b = summarize 0 b | 583 val effs_b = summarize 0 b |
583 | 584 |
584 (*val () = Print.prefaces "Try" | 585 (*val () = Print.prefaces "Try" |
585 [(*("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan)),*) | 586 [(*("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan)),*) |
586 ("e'", MonoPrint.p_exp env e'), | 587 ("e'", MonoPrint.p_exp env e'), |
588 ("b", MonoPrint.p_exp (E.pushERel env x t NONE) b), | |
587 ("e'_eff", p_events effs_e'), | 589 ("e'_eff", p_events effs_e'), |
588 ("b", p_events effs_b)]*) | 590 ("b", p_events effs_b)]*) |
589 | 591 |
590 fun does eff = List.exists (fn eff' => eff' = eff) effs_e' | 592 fun does eff = List.exists (fn eff' => eff' = eff) effs_e' |
591 val writesPage = does WritePage | 593 val writesPage = does WritePage |