comparison src/monoize.sml @ 125:fd98dd10dce7

Corifying (non-mutual) 'val rec'
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Jul 2008 10:23:04 -0400
parents 91027db5a07c
children b04f7422c832
comparison
equal deleted inserted replaced
124:541282b81454 125:fd98dd10dce7
246 in 246 in
247 case d of 247 case d of
248 L.DCon _ => NONE 248 L.DCon _ => NONE
249 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s, 249 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s,
250 (L'.DVal (x, n, monoType env t, monoExp env e, s), loc)) 250 (L'.DVal (x, n, monoType env t, monoExp env e, s), loc))
251 | L.DValRec _ => raise Fail "Monoize DValRec"
251 | L.DExport n => 252 | L.DExport n =>
252 let 253 let
253 val (_, t, _, s) = Env.lookupENamed env n 254 val (_, t, _, s) = Env.lookupENamed env n
254 255
255 fun unwind (t, _) = 256 fun unwind (t, _) =