diff src/checknest.sml @ 1663:0577be31a435

First part of changes to avoid depending on C function call argument order of evaluation (omitting normal Ur function calls, so far)
author Adam Chlipala <adam@chlipala.net>
date Sat, 07 Jan 2012 15:56:22 -0500
parents acabf3935060
children 98895243b5b6
line wrap: on
line diff
--- a/src/checknest.sml	Sat Jan 07 11:01:21 2012 -0500
+++ b/src/checknest.sml	Sat Jan 07 15:56:22 2012 -0500
@@ -44,7 +44,7 @@
               | ENone _ => IS.empty
               | ESome (_, e) => eu e
               | EFfi _ => IS.empty
-              | EFfiApp (_, _, es) => foldl IS.union IS.empty (map eu es)
+              | EFfiApp (_, _, es) => foldl IS.union IS.empty (map (eu o #1) es)
               | EApp (e, es) => foldl IS.union (eu e) (map eu es)
 
               | EUnop (_, e) => eu e
@@ -106,7 +106,7 @@
               | ENone _ => e
               | ESome (t, e) => (ESome (t, ae e), loc)
               | EFfi _ => e
-              | EFfiApp (m, f, es) => (EFfiApp (m, f, map ae es), loc)
+              | EFfiApp (m, f, es) => (EFfiApp (m, f, map (fn (e, t) => (ae e, t)) es), loc)
               | EApp (e, es) => (EApp (ae e, map ae es), loc)
 
               | EUnop (uo, e) => (EUnop (uo, ae e), loc)