Mercurial > urweb
comparison src/monoize.sml @ 955:01a4d936395a
tail example working
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 17 Sep 2009 17:11:23 -0400 |
parents | 2a50da66ffd8 |
children | 8c37699de273 |
comparison
equal
deleted
inserted
replaced
954:2a50da66ffd8 | 955:01a4d936395a |
---|---|
3141 let | 3141 let |
3142 val (es, fm) = ListUtil.foldlMap (fn (e, fm) => monoExp (env, st, fm) e) fm es | 3142 val (es, fm) = ListUtil.foldlMap (fn (e, fm) => monoExp (env, st, fm) e) fm es |
3143 val (ek, fm) = monoExp (env, st, fm) ek | 3143 val (ek, fm) = monoExp (env, st, fm) ek |
3144 | 3144 |
3145 val e = (L'.ENamed n, loc) | 3145 val e = (L'.ENamed n, loc) |
3146 val e = foldl (fn (e, arg) => (L'.EApp (e, arg), loc)) e es | 3146 val e = foldl (fn (arg, e) => (L'.EApp (e, arg), loc)) e es |
3147 val e = (L'.EApp (e, ek), loc) | 3147 val e = (L'.EApp (e, ek), loc) |
3148 in | 3148 in |
3149 (e, fm) | 3149 (e, fm) |
3150 end | 3150 end |
3151 | L.ETailCall _ => (E.errorAt loc "Full scope of tail call continuation isn't known"; | 3151 | L.ETailCall _ => (E.errorAt loc "Full scope of tail call continuation isn't known"; |