[MLton-commit] r4684

Stephen Weeks MLton@mlton.org
Mon, 17 Jul 2006 10:54:43 -0700


Eliminated unused variables.

----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun
U   mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun	2006-07-17 17:27:13 UTC (rev 4683)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/elaborate/elaborate-core.fun	2006-07-17 17:54:40 UTC (rev 4684)
@@ -769,11 +769,11 @@
       fun toNullaryCType (t: t): {ctype: CType.t, name: string} option =
          case deConOpt t of
             NONE => NONE
-          | SOME (c, ts) =>
-               case List.peek (nullary, fn {tycon = c', ...} =>
-                               Tycon.equals (c, c')) of
-                  NONE => NONE
-                | SOME {ctype, name, ...} => SOME {ctype = ctype, name = name}
+          | SOME (c, _) =>
+               Option.map
+               (List.peek (nullary, fn {tycon = c', ...} =>
+                           Tycon.equals (c, c')),
+                fn {ctype, name, ...} => {ctype = ctype, name = name})
 
       fun toUnaryCType (t: t): {ctype: CType.t, name: string} option =
          case deConOpt t of

Modified: mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun	2006-07-17 17:27:13 UTC (rev 4683)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/ssa/deep-flatten.fun	2006-07-17 17:54:40 UTC (rev 4684)
@@ -830,7 +830,6 @@
                      NONE => bug ()
                    | SOME y => y
          end
-      fun replaceVars xs = Vector.map (xs, replaceVar)
       fun transformBind {exp, ty, var}: Statement.t list =
          let
             fun simpleTree () = Option.app (var, simpleVarTree)
@@ -910,7 +909,7 @@
                                            end
                                   end
                          end)
-             | PrimApp {args, prim} => simple ()
+             | PrimApp _ => simple ()
              | Select {base, offset} =>
                   (case var of
                       NONE => none ()