diff src/mono_reduce.sml @ 185:19ee24bffbc0

FFI datatypes
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 17:57:47 -0400
parents 98c29e3986d3
children 8e9f97508f0d
line wrap: on
line diff
--- a/src/mono_reduce.sml	Sun Aug 03 16:53:13 2008 -0400
+++ b/src/mono_reduce.sml	Sun Aug 03 17:57:47 2008 -0400
@@ -79,18 +79,30 @@
         else
             NONE
 
-      | (PCon (PConVar n1, NONE), ECon (n2, NONE)) =>
+      | (PCon (PConVar n1, NONE), ECon (PConVar n2, NONE)) =>
         if n1 = n2 then
             SOME env
         else
             NONE
 
-      | (PCon (PConVar n1, SOME p), ECon (n2, SOME e)) =>
+      | (PCon (PConVar n1, SOME p), ECon (PConVar n2, SOME e)) =>
         if n1 = n2 then
             match (env, p, e)
         else
             NONE
 
+      | (PCon (PConFfi {mod = m1, con = con1, ...}, NONE), ECon (PConFfi {mod = m2, con = con2, ...}, NONE)) =>
+        if m1 = m2 andalso con1 = con2 then
+            SOME env
+        else
+            NONE
+
+      | (PCon (PConFfi {mod = m1, con = con1, ...}, SOME ep), ECon (PConFfi {mod = m2, con = con2, ...}, SOME e)) =>
+        if m1 = m2 andalso con1 = con2 then
+            match (env, p, e)
+        else
+            NONE
+
       | (PRecord xps, ERecord xes) =>
         let
             fun consider (xps, env) =