diff src/core_util.sml @ 607:0dd40b6bfdf3

Start of RPCification
author Adam Chlipala <adamc@hcoop.net>
date Sat, 14 Feb 2009 14:07:56 -0500
parents 3162bbf8e30f
children 56aaa1941dad
line wrap: on
line diff
--- a/src/core_util.sml	Tue Jan 27 09:53:51 2009 -0500
+++ b/src/core_util.sml	Sat Feb 14 14:07:56 2009 -0500
@@ -479,6 +479,13 @@
       | (ELet (_, _, x1, e1), ELet (_, _, x2, e2)) =>
         join (compare (x1, x2),
               fn () => compare (e1, e2))
+      | (ELet _, _) => LESS
+      | (_, ELet _) => GREATER
+
+      | (EServerCall (n1, es1, e1), EServerCall (n2, es2, e2)) =>
+        join (Int.compare (n1, n2),
+              fn () => join (joinL compare (es1, es2),
+                             fn () => compare (e1, e2)))
 
 datatype binder =
          RelC of string * kind
@@ -653,6 +660,13 @@
                                           fn e2' =>
                                              (ELet (x, t', e1', e2'), loc))))
 
+              | EServerCall (n, es, e) =>
+                S.bind2 (ListUtil.mapfold (mfe ctx) es,
+                      fn es' =>
+                         S.map2 (mfe ctx e,
+                                 fn e' =>
+                                    (EServerCall (n, es', e'), loc)))
+                         
         and mfp ctx (pAll as (p, loc)) =
             case p of
                 PWild => S.return2 pAll