Mercurial > urweb
comparison src/mono_reduce.sml @ 568:55fc747a67dc
Initial <dyn> support
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 20 Dec 2008 15:46:48 -0500 |
parents | a152905c3c3b |
children | 57018f21cd5c |
comparison
equal
deleted
inserted
replaced
567:1901db85acb4 | 568:55fc747a67dc |
---|---|
73 | 73 |
74 | ESeq (e1, e2) => impure e1 orelse impure e2 | 74 | ESeq (e1, e2) => impure e1 orelse impure e2 |
75 | ELet (_, _, e1, e2) => impure e1 orelse impure e2 | 75 | ELet (_, _, e1, e2) => impure e1 orelse impure e2 |
76 | 76 |
77 | EClosure (_, es) => List.exists impure es | 77 | EClosure (_, es) => List.exists impure es |
78 | EJavaScript e => impure e | 78 | EJavaScript (_, e) => impure e |
79 | ESignalReturn e => impure e | |
79 | 80 |
80 | 81 |
81 val liftExpInExp = Monoize.liftExpInExp | 82 val liftExpInExp = Monoize.liftExpInExp |
82 | 83 |
83 val subExpInExp' = | 84 val subExpInExp' = |
328 [ReadDb]] | 329 [ReadDb]] |
329 | 330 |
330 | EDml e => summarize d e @ [WriteDb] | 331 | EDml e => summarize d e @ [WriteDb] |
331 | ENextval e => summarize d e @ [WriteDb] | 332 | ENextval e => summarize d e @ [WriteDb] |
332 | EUnurlify (e, _) => summarize d e | 333 | EUnurlify (e, _) => summarize d e |
333 | EJavaScript e => summarize d e | 334 | EJavaScript (_, e) => summarize d e |
335 | ESignalReturn e => summarize d e | |
334 | 336 |
335 | 337 |
336 fun exp env e = | 338 fun exp env e = |
337 let | 339 let |
338 (*val () = Print.prefaces "exp" [("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan))]*) | 340 (*val () = Print.prefaces "exp" [("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan))]*) |
419 #1 (reduceExp env (subExpInExp (0, e') b)) | 421 #1 (reduceExp env (subExpInExp (0, e') b)) |
420 | 422 |
421 fun trySub () = | 423 fun trySub () = |
422 case t of | 424 case t of |
423 (TFfi ("Basis", "string"), _) => doSub () | 425 (TFfi ("Basis", "string"), _) => doSub () |
426 | (TSignal _, _) => e | |
424 | _ => | 427 | _ => |
425 case e' of | 428 case e' of |
426 (ECase _, _) => e | 429 (ECase _, _) => e |
427 | _ => doSub () | 430 | _ => doSub () |
428 in | 431 in |