comparison 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
comparison
equal deleted inserted replaced
187:fb6ed259f5bd 188:8e9f97508f0d
57 57
58 | CUnit 58 | CUnit
59 59
60 withtype con = con' located 60 withtype con = con' located
61 61
62 datatype datatype_kind = datatype Elab.datatype_kind
63
62 datatype patCon = 64 datatype patCon =
63 PConVar of int 65 PConVar of int
64 | PConFfi of {mod : string, datatyp : string, con : string, arg : con option} 66 | PConFfi of {mod : string, datatyp : string, con : string, arg : con option, kind : datatype_kind}
65 67
66 datatype pat' = 68 datatype pat' =
67 PWild 69 PWild
68 | PVar of string * con 70 | PVar of string * con
69 | PPrim of Prim.t 71 | PPrim of Prim.t
70 | PCon of patCon * pat option 72 | PCon of datatype_kind * patCon * pat option
71 | PRecord of (string * pat * con) list 73 | PRecord of (string * pat * con) list
72 74
73 withtype pat = pat' located 75 withtype pat = pat' located
74 76
75 datatype exp' = 77 datatype exp' =
76 EPrim of Prim.t 78 EPrim of Prim.t
77 | ERel of int 79 | ERel of int
78 | ENamed of int 80 | ENamed of int
79 | ECon of patCon * exp option 81 | ECon of datatype_kind * patCon * exp option
80 | EFfi of string * string 82 | EFfi of string * string
81 | EFfiApp of string * string * exp list 83 | EFfiApp of string * string * exp list
82 | EApp of exp * exp 84 | EApp of exp * exp
83 | EAbs of string * con * con * exp 85 | EAbs of string * con * con * exp
84 | ECApp of exp * con 86 | ECApp of exp * con