diff src/core.sml @ 188:8e9f97508f0d

Datatype representation optimization
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 19:49:21 -0400
parents 88d46972de53
children 9bbf4d383381
line wrap: on
line diff
--- a/src/core.sml	Sun Aug 03 19:01:16 2008 -0400
+++ b/src/core.sml	Sun Aug 03 19:49:21 2008 -0400
@@ -59,15 +59,17 @@
 
 withtype con = con' located
 
+datatype datatype_kind = datatype Elab.datatype_kind
+
 datatype patCon =
          PConVar of int
-       | PConFfi of {mod : string, datatyp : string, con : string, arg : con option}
+       | PConFfi of {mod : string, datatyp : string, con : string, arg : con option, kind : datatype_kind}
 
 datatype pat' =
          PWild
        | PVar of string * con
        | PPrim of Prim.t
-       | PCon of patCon * pat option
+       | PCon of datatype_kind * patCon * pat option
        | PRecord of (string * pat * con) list
 
 withtype pat = pat' located
@@ -76,7 +78,7 @@
          EPrim of Prim.t
        | ERel of int
        | ENamed of int
-       | ECon of patCon * exp option
+       | ECon of datatype_kind * patCon * exp option
        | EFfi of string * string
        | EFfiApp of string * string * exp list
        | EApp of exp * exp