diff src/termination.sml @ 453:787d4931fb07

Almost have that nested save function compiling
author Adam Chlipala <adamc@hcoop.net>
date Sat, 01 Nov 2008 21:19:43 -0400
parents 85819353a84f
children ae03d09043c1
line wrap: on
line diff
--- a/src/termination.sml	Sat Nov 01 17:19:12 2008 -0400
+++ b/src/termination.sml	Sat Nov 01 21:19:43 2008 -0400
@@ -293,7 +293,15 @@
                       | EUnif (ref (SOME e)) => exp parent (penv, calls) e
                       | EUnif (ref NONE) => (Rabble, calls)
 
-                      | ELet (_, e) => exp parent (penv, calls) e
+                      | ELet (eds, e) =>
+                        let
+                            fun extPenv ((ed, _), penv) =
+                                case ed of
+                                    EDVal _ => Rabble :: penv
+                                  | EDValRec vis => foldl (fn (_, penv) => Rabble :: penv) penv vis
+                        in
+                            exp parent (foldl extPenv penv eds, calls) e
+                        end
                 end
 
             fun doVali (i, (_, f, _, e), calls) =