changeset 1489:4437b008e0ab

Narrow Maybe match case.
author Karn Kallio <kkallio@eka>
date Wed, 06 Jul 2011 18:54:23 -0430
parents e2611b5dafce
children a77fa7e7bb7b
files src/mono_reduce.sml
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/mono_reduce.sml	Wed Jul 06 09:22:08 2011 -0400
+++ b/src/mono_reduce.sml	Wed Jul 06 18:54:23 2011 -0430
@@ -204,15 +204,12 @@
         else
             No
 
-      | (PCon (_, PConVar n1, NONE), ECon (_, PConVar n2, NONE)) =>
+      | (PCon (_, PConVar n1, po), ECon (_, PConVar n2, eo)) =>
         if n1 = n2 then
-            Yes env
-        else
-            No
-
-      | (PCon (_, PConVar n1, SOME p), ECon (_, PConVar n2, SOME e)) =>
-        if n1 = n2 then
-            match (env, p, e)
+            case (po, eo) of
+                (NONE, NONE) => Yes env
+              | (SOME p, SOME e) => match (env, p, e)
+              | _ => Maybe
         else
             No