comparison src/scriptcheck.sml @ 2252:e843a04499d4

Revert to revision 2222.
author Ziv Scully <ziv@mit.edu>
date Mon, 21 Sep 2015 10:16:55 -0400
parents 25874084bf1f
children
comparison
equal deleted inserted replaced
2251:25874084bf1f 2252:e843a04499d4
14 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
89 | Module m => (print "<Module>\n"; 89 | Module m => (print "<Module>\n";
90 SM.appi (fn (k, r') => (print (k ^ ":\n"); 90 SM.appi (fn (k, r') => (print (k ^ ":\n");
91 dump r')) m; 91 dump r')) m;
92 print "</Module>\n") 92 print "</Module>\n")
93 93
94 fun classify {decls = ds, sideInfo = ps} = 94 fun classify (ds, ps) =
95 let 95 let
96 val proto = Settings.currentProtocol () 96 val proto = Settings.currentProtocol ()
97 97
98 fun inString {needle, haystack} = String.isSubstring needle haystack 98 fun inString {needle, haystack} = String.isSubstring needle haystack
99 99
100 fun hasClient {basis, rpcs, funcs, push} = 100 fun hasClient {basis, rpcs, funcs, push} =
101 MonoUtil.Exp.exists {typ = fn _ => false, 101 MonoUtil.Exp.exists {typ = fn _ => false,
102 exp = fn ERecv _ => push 102 exp = fn ERecv _ => push
103 | EFfiApp ("Basis", x, _) => SS.member (basis, x) 103 | EFfiApp ("Basis", x, _) => SS.member (basis, x)
104 | EJavaScript _ => not push 104 | EJavaScript _ => not push
105 | ENamed n => IS.member (funcs, n) 105 | ENamed n => IS.member (funcs, n)
106 | EServerCall (e, _, _, _) => 106 | EServerCall (e, _, _, _) =>
107 let 107 let
108 fun head (e : exp) = 108 fun head (e : exp) =
173 else if IS.member (pull_ids, n) then 173 else if IS.member (pull_ids, n) then
174 ServerAndPull 174 ServerAndPull
175 else 175 else
176 ServerOnly, AnyDb)) (IS.listItems all_ids) 176 ServerOnly, AnyDb)) (IS.listItems all_ids)
177 in 177 in
178 {decls = ds, sideInfo = ps} 178 (ds, ps)
179 end 179 end
180 180
181 end 181 end
182