comparison src/core_util.sml @ 26:4ab19c19665f

Closure conversion
author Adam Chlipala <adamc@hcoop.net>
date Tue, 10 Jun 2008 15:56:33 -0400
parents bfa2e9ae4df8
children 537db4ee89f4
comparison
equal deleted inserted replaced
25:0a762c73824d 26:4ab19c19665f
220 S.bind2 (mfe ctx e1, 220 S.bind2 (mfe ctx e1,
221 fn e1' => 221 fn e1' =>
222 S.map2 (mfe ctx e2, 222 S.map2 (mfe ctx e2,
223 fn e2' => 223 fn e2' =>
224 (EApp (e1', e2'), loc))) 224 (EApp (e1', e2'), loc)))
225 | EAbs (x, t, e) => 225 | EAbs (x, dom, ran, e) =>
226 S.bind2 (mfc ctx t, 226 S.bind2 (mfc ctx dom,
227 fn t' => 227 fn dom' =>
228 S.map2 (mfe (bind (ctx, RelE (x, t))) e, 228 S.bind2 (mfc ctx ran,
229 fn e' => 229 fn ran' =>
230 (EAbs (x, t', e'), loc))) 230 S.map2 (mfe (bind (ctx, RelE (x, dom'))) e,
231 fn e' =>
232 (EAbs (x, dom', ran', e'), loc))))
231 233
232 | ECApp (e, c) => 234 | ECApp (e, c) =>
233 S.bind2 (mfe ctx e, 235 S.bind2 (mfe ctx e,
234 fn e' => 236 fn e' =>
235 S.map2 (mfc ctx c, 237 S.map2 (mfc ctx c,