comparison src/monoize.sml @ 26:4ab19c19665f

Closure conversion
author Adam Chlipala <adamc@hcoop.net>
date Tue, 10 Jun 2008 15:56:33 -0400
parents 0a762c73824d
children 537db4ee89f4
comparison
equal deleted inserted replaced
25:0a762c73824d 26:4ab19c19665f
84 case e of 84 case e of
85 L.EPrim p => (L'.EPrim p, loc) 85 L.EPrim p => (L'.EPrim p, loc)
86 | L.ERel n => (L'.ERel n, loc) 86 | L.ERel n => (L'.ERel n, loc)
87 | L.ENamed n => (L'.ENamed n, loc) 87 | L.ENamed n => (L'.ENamed n, loc)
88 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc) 88 | L.EApp (e1, e2) => (L'.EApp (monoExp env e1, monoExp env e2), loc)
89 | L.EAbs (x, t, e) => 89 | L.EAbs (x, dom, ran, e) =>
90 (L'.EAbs (x, monoType env t, monoExp (Env.pushERel env x t) e), loc) 90 (L'.EAbs (x, monoType env dom, monoType env ran, monoExp (Env.pushERel env x dom) e), loc)
91 | L.ECApp _ => poly () 91 | L.ECApp _ => poly ()
92 | L.ECAbs _ => poly () 92 | L.ECAbs _ => poly ()
93 93
94 | L.ERecord xes => (L'.ERecord (map (fn (x, e) => (monoName env x, monoExp env e)) xes), loc) 94 | L.ERecord xes => (L'.ERecord (map (fn (x, e) => (monoName env x, monoExp env e)) xes), loc)
95 | L.EField (e, x, _) => (L'.EField (monoExp env e, monoName env x), loc) 95 | L.EField (e, x, _) => (L'.EField (monoExp env e, monoName env x), loc)