comparison src/mono.sml @ 188:8e9f97508f0d

Datatype representation optimization
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 19:49:21 -0400
parents 88d46972de53
children 890a61991263
comparison
equal deleted inserted replaced
187:fb6ed259f5bd 188:8e9f97508f0d
27 27
28 structure Mono = struct 28 structure Mono = struct
29 29
30 type 'a located = 'a ErrorMsg.located 30 type 'a located = 'a ErrorMsg.located
31 31
32 datatype datatype_kind = datatype Core.datatype_kind
33
32 datatype typ' = 34 datatype typ' =
33 TFun of typ * typ 35 TFun of typ * typ
34 | TRecord of (string * typ) list 36 | TRecord of (string * typ) list
35 | TDatatype of int * (string * int * typ option) list 37 | TDatatype of datatype_kind * int * (string * int * typ option) list
36 | TFfi of string * string 38 | TFfi of string * string
37 39
38 withtype typ = typ' located 40 withtype typ = typ' located
39 41
40 datatype patCon = 42 datatype patCon =
43 45
44 datatype pat' = 46 datatype pat' =
45 PWild 47 PWild
46 | PVar of string * typ 48 | PVar of string * typ
47 | PPrim of Prim.t 49 | PPrim of Prim.t
48 | PCon of patCon * pat option 50 | PCon of datatype_kind * patCon * pat option
49 | PRecord of (string * pat * typ) list 51 | PRecord of (string * pat * typ) list
50 52
51 withtype pat = pat' located 53 withtype pat = pat' located
52 54
53 datatype exp' = 55 datatype exp' =
54 EPrim of Prim.t 56 EPrim of Prim.t
55 | ERel of int 57 | ERel of int
56 | ENamed of int 58 | ENamed of int
57 | ECon of patCon * exp option 59 | ECon of datatype_kind * patCon * exp option
58 | EFfi of string * string 60 | EFfi of string * string
59 | EFfiApp of string * string * exp list 61 | EFfiApp of string * string * exp list
60 | EApp of exp * exp 62 | EApp of exp * exp
61 | EAbs of string * typ * typ * exp 63 | EAbs of string * typ * typ * exp
62 64