diff src/mono_reduce.sml @ 456:1a4fa157fedd

Monoizing FFI transactions correctly
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 09:21:34 -0500
parents 9095a95a1bf9
children 21bb5bbba2e9
line wrap: on
line diff
--- a/src/mono_reduce.sml	Tue Nov 04 09:33:35 2008 -0500
+++ b/src/mono_reduce.sml	Thu Nov 06 09:21:34 2008 -0500
@@ -352,10 +352,15 @@
 
               | ELet (x, t, e', b) =>
                 let
+                    fun doSub () = #1 (reduceExp env (subExpInExp (0, e') b))
+
                     fun trySub () =
-                        case e' of
-                            (ECase _, _) => e
-                          | _ => #1 (reduceExp env (subExpInExp (0, e') b))
+                        case t of
+                            (TFfi ("Basis", "string"), _) => doSub ()
+                          | _ =>
+                            case e' of
+                                (ECase _, _) => e
+                              | _ => doSub ()
                 in
                     if impure e' then
                         let