Mercurial > urweb
diff src/mono_reduce.sml @ 572:57018f21cd5c
Handling singnal bind
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 21 Dec 2008 12:30:57 -0500 |
parents | 55fc747a67dc |
children | ac947e2f29ff |
line wrap: on
line diff
--- a/src/mono_reduce.sml Sun Dec 21 12:01:00 2008 -0500 +++ b/src/mono_reduce.sml Sun Dec 21 12:30:57 2008 -0500 @@ -77,6 +77,7 @@ | EClosure (_, es) => List.exists impure es | EJavaScript (_, e) => impure e | ESignalReturn e => impure e + | ESignalBind (e1, e2) => impure e1 orelse impure e2 val liftExpInExp = Monoize.liftExpInExp @@ -333,6 +334,7 @@ | EUnurlify (e, _) => summarize d e | EJavaScript (_, e) => summarize d e | ESignalReturn e => summarize d e + | ESignalBind (e1, e2) => summarize d e1 @ summarize d e2 fun exp env e = @@ -478,6 +480,9 @@ | EStrcat ((EPrim (Prim.String s1), _), (EPrim (Prim.String s2), _)) => EPrim (Prim.String (s1 ^ s2)) + | ESignalBind ((ESignalReturn e1, loc), e2) => + #1 (reduceExp env (EApp (e2, e1), loc)) + | _ => e in (*Print.prefaces "exp'" [("r", MonoPrint.p_exp env (r, ErrorMsg.dummySpan))];*)