comparison src/elab.sml @ 191:aa54250f58ac

Parametrized datatypes through explify
author Adam Chlipala <adamc@hcoop.net>
date Fri, 08 Aug 2008 10:28:32 -0400
parents 8e9f97508f0d
children ab86aa858e6c
comparison
equal deleted inserted replaced
190:3eb53c957d10 191:aa54250f58ac
81 81
82 datatype pat' = 82 datatype pat' =
83 PWild 83 PWild
84 | PVar of string * con 84 | PVar of string * con
85 | PPrim of Prim.t 85 | PPrim of Prim.t
86 | PCon of datatype_kind * patCon * pat option 86 | PCon of datatype_kind * patCon * con list * pat option
87 | PRecord of (string * pat * con) list 87 | PRecord of (string * pat * con) list
88 88
89 withtype pat = pat' located 89 withtype pat = pat' located
90 90
91 datatype exp' = 91 datatype exp' =
110 withtype exp = exp' located 110 withtype exp = exp' located
111 111
112 datatype sgn_item' = 112 datatype sgn_item' =
113 SgiConAbs of string * int * kind 113 SgiConAbs of string * int * kind
114 | SgiCon of string * int * kind * con 114 | SgiCon of string * int * kind * con
115 | SgiDatatype of string * int * (string * int * con option) list 115 | SgiDatatype of string * int * string list * (string * int * con option) list
116 | SgiDatatypeImp of string * int * int * string list * string * (string * int * con option) list 116 | SgiDatatypeImp of string * int * int * string list * string * string list * (string * int * con option) list
117 | SgiVal of string * int * con 117 | SgiVal of string * int * con
118 | SgiStr of string * int * sgn 118 | SgiStr of string * int * sgn
119 | SgiSgn of string * int * sgn 119 | SgiSgn of string * int * sgn
120 | SgiConstraint of con * con 120 | SgiConstraint of con * con
121 121
130 withtype sgn_item = sgn_item' located 130 withtype sgn_item = sgn_item' located
131 and sgn = sgn' located 131 and sgn = sgn' located
132 132
133 datatype decl' = 133 datatype decl' =
134 DCon of string * int * kind * con 134 DCon of string * int * kind * con
135 | DDatatype of string * int * (string * int * con option) list 135 | DDatatype of string * int * string list * (string * int * con option) list
136 | DDatatypeImp of string * int * int * string list * string * (string * int * con option) list 136 | DDatatypeImp of string * int * int * string list * string * string list * (string * int * con option) list
137 | DVal of string * int * con * exp 137 | DVal of string * int * con * exp
138 | DValRec of (string * int * con * exp) list 138 | DValRec of (string * int * con * exp) list
139 | DSgn of string * int * sgn 139 | DSgn of string * int * sgn
140 | DStr of string * int * sgn * str 140 | DStr of string * int * sgn * str
141 | DFfiStr of string * int * sgn 141 | DFfiStr of string * int * sgn