From 744cdbb9e3907db9bb01576750634c614147e1a3 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 3 Aug 2008 19:49:21 -0400 Subject: Datatype representation optimization --- src/core.sml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core.sml') diff --git a/src/core.sml b/src/core.sml index e9fd570c..3f56b49c 100644 --- a/src/core.sml +++ b/src/core.sml @@ -59,15 +59,17 @@ datatype con' = 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 @@ datatype exp' = 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 -- cgit v1.2.3