comparison src/rpcify.sml @ 1677:3cfc79f92db7

-dumpSource flag; Especialize tweak: may specialize any argument sequence ending in a value of function-containing type
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Jan 2012 20:37:39 -0500
parents 72670131dace
children 385a1b799a74
comparison
equal deleted inserted replaced
1676:266814b15dd6 1677:3cfc79f92db7
1 (* Copyright (c) 2009, Adam Chlipala 1 (* Copyright (c) 2009, 2012, 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 *
91 91
92 fun newRpc (trans : exp, st : state) = 92 fun newRpc (trans : exp, st : state) =
93 case getApp (#1 trans, []) of 93 case getApp (#1 trans, []) of
94 NONE => (ErrorMsg.errorAt (#2 trans) 94 NONE => (ErrorMsg.errorAt (#2 trans)
95 "RPC code doesn't use a named function or transaction"; 95 "RPC code doesn't use a named function or transaction";
96 (*Print.preface ("Expression",
97 CorePrint.p_exp CoreEnv.empty trans);*)
96 (#1 trans, st)) 98 (#1 trans, st))
97 | SOME (n, args) => 99 | SOME (n, args) =>
98 case IM.find (tfuncs, n) of 100 case IM.find (tfuncs, n) of
99 NONE => ((*Print.prefaces "BAD" [("e", CorePrint.p_exp CoreEnv.empty (e, loc))];*) 101 NONE => ((*Print.prefaces "BAD" [("e", CorePrint.p_exp CoreEnv.empty (e, loc))];*)
100 raise Fail ("Rpcify: Undetected transaction function " ^ Int.toString n)) 102 raise Fail ("Rpcify: Undetected transaction function " ^ Int.toString n))