summaryrefslogtreecommitdiff
path: root/src/core.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 19:49:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-08-03 19:49:21 -0400
commit744cdbb9e3907db9bb01576750634c614147e1a3 (patch)
treeaecef31d4055d34a31977834cbda020811d1dfab /src/core.sml
parent9a9f1738a8eae9df07f97da224cd9cf45033e9dc (diff)
Datatype representation optimization
Diffstat (limited to 'src/core.sml')
-rw-r--r--src/core.sml8
1 files changed, 5 insertions, 3 deletions
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