comparison src/monoize.sml @ 115:ff13d390ec60

Cjr ready for dispatch code generation
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 12:56:39 -0400
parents 2d6116de9cca
children 7207f794b916
comparison
equal deleted inserted replaced
114:0644d3c3bedf 115:ff13d390ec60
226 in 226 in
227 case d of 227 case d of
228 L.DCon _ => NONE 228 L.DCon _ => NONE
229 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s, 229 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s,
230 (L'.DVal (x, n, monoType env t, monoExp env e, s), loc)) 230 (L'.DVal (x, n, monoType env t, monoExp env e, s), loc))
231 | L.DExport n => SOME (env, (L'.DExport n, loc)) 231 | L.DExport n =>
232 let
233 val (_, _, _, s) = Env.lookupENamed env n
234 in
235 SOME (env, (L'.DExport (s, n), loc))
236 end
232 end 237 end
233 238
234 fun monoize env ds = 239 fun monoize env ds =
235 let 240 let
236 val (_, ds) = List.foldl (fn (d, (env, ds)) => 241 val (_, ds) = List.foldl (fn (d, (env, ds)) =>