comparison src/marshalcheck.sml @ 765:a28982de5645

Successfully influenced effectful-ness status of FFI func
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 May 2009 11:27:26 -0400
parents 8323c1beef2e
children 61a1f5c5ae2c
comparison
equal deleted inserted replaced
764:7f653298dd66 765:a28982de5645
51 | x :: xs => List.foldl (fn (x, s) => s ^ ", " ^ toString' x) (toString' x) xs 51 | x :: xs => List.foldl (fn (x, s) => s ^ ", " ^ toString' x) (toString' x) xs
52 end 52 end
53 53
54 structure IM = IntBinaryMap 54 structure IM = IntBinaryMap
55 55
56 val clientToServer = [("Basis", "int"),
57 ("Basis", "float"),
58 ("Basis", "string"),
59 ("Basis", "time"),
60 ("Basis", "file"),
61 ("Basis", "unit"),
62 ("Basis", "option"),
63 ("Basis", "list"),
64 ("Basis", "bool")]
65
66 val clientToServer = PS.addList (PS.empty, clientToServer)
67
68 fun check file = 56 fun check file =
69 let 57 let
70 fun kind (_, st) = st 58 fun kind (_, st) = st
71 59
72 fun con cmap (c, st) = 60 fun con cmap (c, st) =
73 case c of 61 case c of
74 CFfi mx => 62 CFfi mx =>
75 if PS.member (clientToServer, mx) then 63 if Settings.mayClientToServer mx then
76 st 64 st
77 else 65 else
78 PS.add (st, mx) 66 PS.add (st, mx)
79 | CNamed n => 67 | CNamed n =>
80 (case IM.find (cmap, n) of 68 (case IM.find (cmap, n) of