Mercurial > urweb
comparison src/elab_util.sml @ 26:4ab19c19665f
Closure conversion
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 10 Jun 2008 15:56:33 -0400 |
parents | f1c36df29ed7 |
children | 537db4ee89f4 |
comparison
equal
deleted
inserted
replaced
25:0a762c73824d | 26:4ab19c19665f |
---|---|
212 S.bind2 (mfe ctx e1, | 212 S.bind2 (mfe ctx e1, |
213 fn e1' => | 213 fn e1' => |
214 S.map2 (mfe ctx e2, | 214 S.map2 (mfe ctx e2, |
215 fn e2' => | 215 fn e2' => |
216 (EApp (e1', e2'), loc))) | 216 (EApp (e1', e2'), loc))) |
217 | EAbs (x, t, e) => | 217 | EAbs (x, dom, ran, e) => |
218 S.bind2 (mfc ctx t, | 218 S.bind2 (mfc ctx dom, |
219 fn t' => | 219 fn dom' => |
220 S.map2 (mfe (bind (ctx, RelE (x, t))) e, | 220 S.bind2 (mfc ctx ran, |
221 fn e' => | 221 fn ran' => |
222 (EAbs (x, t', e'), loc))) | 222 S.map2 (mfe (bind (ctx, RelE (x, dom'))) e, |
223 | 223 fn e' => |
224 (EAbs (x, dom', ran', e'), loc)))) | |
225 | |
224 | ECApp (e, c) => | 226 | ECApp (e, c) => |
225 S.bind2 (mfe ctx e, | 227 S.bind2 (mfe ctx e, |
226 fn e' => | 228 fn e' => |
227 S.map2 (mfc ctx c, | 229 S.map2 (mfc ctx c, |
228 fn c' => | 230 fn c' => |