diff src/specialize.sml @ 851:20a364c4a6dc

Fix a bug with 'Some p' patterns, where 'p' needs specialization
author Adam Chlipala <adamc@hcoop.net>
date Thu, 18 Jun 2009 18:06:15 -0400
parents 0f7e2cca6d9b
children 5b5c0b552f59
line wrap: on
line diff
--- a/src/specialize.sml	Tue Jun 16 17:52:44 2009 -0400
+++ b/src/specialize.sml	Thu Jun 18 18:06:15 2009 -0400
@@ -190,6 +190,12 @@
                               | SOME pn' => ((PCon (dk, PConVar pn', [], po), #2 p), st)
                         end
         end
+      | PCon (dk, pc, args, SOME p') =>
+        let
+            val (p', st) = pat (p', st)
+        in
+            ((PCon (dk, pc, args, SOME p'), #2 p), st)
+        end
       | PCon _ => (p, st)
       | PRecord xps =>
         let