comparison src/core.sml @ 192:9bbf4d383381

Parametrized datatypes through corify
author Adam Chlipala <adamc@hcoop.net>
date Fri, 08 Aug 2008 10:59:06 -0400
parents 8e9f97508f0d
children 766b5475477f
comparison
equal deleted inserted replaced
191:aa54250f58ac 192:9bbf4d383381
61 61
62 datatype datatype_kind = datatype Elab.datatype_kind 62 datatype datatype_kind = datatype Elab.datatype_kind
63 63
64 datatype patCon = 64 datatype patCon =
65 PConVar of int 65 PConVar of int
66 | PConFfi of {mod : string, datatyp : string, con : string, arg : con option, kind : datatype_kind} 66 | PConFfi of {mod : string, datatyp : string, params : string list,
67 con : string, arg : con option, kind : datatype_kind}
67 68
68 datatype pat' = 69 datatype pat' =
69 PWild 70 PWild
70 | PVar of string * con 71 | PVar of string * con
71 | PPrim of Prim.t 72 | PPrim of Prim.t
72 | PCon of datatype_kind * patCon * pat option 73 | PCon of datatype_kind * patCon * con list * pat option
73 | PRecord of (string * pat * con) list 74 | PRecord of (string * pat * con) list
74 75
75 withtype pat = pat' located 76 withtype pat = pat' located
76 77
77 datatype exp' = 78 datatype exp' =
78 EPrim of Prim.t 79 EPrim of Prim.t
79 | ERel of int 80 | ERel of int
80 | ENamed of int 81 | ENamed of int
81 | ECon of datatype_kind * patCon * exp option 82 | ECon of datatype_kind * patCon * con list * exp option
82 | EFfi of string * string 83 | EFfi of string * string
83 | EFfiApp of string * string * exp list 84 | EFfiApp of string * string * exp list
84 | EApp of exp * exp 85 | EApp of exp * exp
85 | EAbs of string * con * con * exp 86 | EAbs of string * con * con * exp
86 | ECApp of exp * con 87 | ECApp of exp * con
103 Link 104 Link
104 | Action 105 | Action
105 106
106 datatype decl' = 107 datatype decl' =
107 DCon of string * int * kind * con 108 DCon of string * int * kind * con
108 | DDatatype of string * int * (string * int * con option) list 109 | DDatatype of string * int * string list * (string * int * con option) list
109 | DVal of string * int * con * exp * string 110 | DVal of string * int * con * exp * string
110 | DValRec of (string * int * con * exp * string) list 111 | DValRec of (string * int * con * exp * string) list
111 | DExport of export_kind * int 112 | DExport of export_kind * int
112 113
113 withtype decl = decl' located 114 withtype decl = decl' located