changeset 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 1c2f335297b7
children 4d4c62d95b9c
files src/specialize.sml
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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