Mercurial > urweb
comparison src/effectize.sml @ 1848:e15234fbb163
Basis.tryRpc
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 16 Apr 2013 10:55:48 -0400 |
parents | b6df00ed536c |
children | 2a0b9603d8af |
comparison
equal
deleted
inserted
replaced
1847:8958b580d026 | 1848:e15234fbb163 |
---|---|
1 (* Copyright (c) 2009-2010, Adam Chlipala | 1 (* Copyright (c) 2009-2010, 2013, Adam Chlipala |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are met: | 5 * modification, are permitted provided that the following conditions are met: |
6 * | 6 * |
44 fun expOnload evs e = | 44 fun expOnload evs e = |
45 case e of | 45 case e of |
46 EFfi f => effectful f | 46 EFfi f => effectful f |
47 | EFfiApp (m, x, _) => effectful (m, x) | 47 | EFfiApp (m, x, _) => effectful (m, x) |
48 | ENamed n => IM.inDomain (evs, n) | 48 | ENamed n => IM.inDomain (evs, n) |
49 | EServerCall (n, _, _) => IM.inDomain (evs, n) | 49 | EServerCall (n, _, _, _) => IM.inDomain (evs, n) |
50 | _ => false | 50 | _ => false |
51 | 51 |
52 fun couldWriteOnload evs = U.Exp.exists {kind = fn _ => false, | 52 fun couldWriteOnload evs = U.Exp.exists {kind = fn _ => false, |
53 con = fn _ => false, | 53 con = fn _ => false, |
54 exp = expOnload evs} | 54 exp = expOnload evs} |
67 exp = exp evs} | 67 exp = exp evs} |
68 | 68 |
69 fun exp writers readers pushers e = | 69 fun exp writers readers pushers e = |
70 case e of | 70 case e of |
71 ENamed n => IM.inDomain (pushers, n) | 71 ENamed n => IM.inDomain (pushers, n) |
72 | EServerCall (n, _, _) => IM.inDomain (writers, n) andalso IM.inDomain (readers, n) | 72 | EServerCall (n, _, _, _) => IM.inDomain (writers, n) andalso IM.inDomain (readers, n) |
73 | _ => false | 73 | _ => false |
74 | 74 |
75 fun couldWriteWithRpc writers readers pushers = U.Exp.exists {kind = fn _ => false, | 75 fun couldWriteWithRpc writers readers pushers = U.Exp.exists {kind = fn _ => false, |
76 con = fn _ => false, | 76 con = fn _ => false, |
77 exp = exp writers readers pushers} | 77 exp = exp writers readers pushers} |
78 | 78 |
79 fun exp evs e = | 79 fun exp evs e = |
80 case e of | 80 case e of |
81 EFfi ("Basis", "getCookie") => true | 81 EFfi ("Basis", "getCookie") => true |
82 | ENamed n => IM.inDomain (evs, n) | 82 | ENamed n => IM.inDomain (evs, n) |
83 | EServerCall (n, _, _) => IM.inDomain (evs, n) | 83 | EServerCall (n, _, _, _) => IM.inDomain (evs, n) |
84 | _ => false | 84 | _ => false |
85 | 85 |
86 fun couldReadCookie evs = U.Exp.exists {kind = fn _ => false, | 86 fun couldReadCookie evs = U.Exp.exists {kind = fn _ => false, |
87 con = fn _ => false, | 87 con = fn _ => false, |
88 exp = exp evs} | 88 exp = exp evs} |