comparison src/monoize.sml @ 163:80192edca30d

Datatypes through corify
author Adam Chlipala <adamc@hcoop.net>
date Tue, 29 Jul 2008 13:16:21 -0400
parents 4334bb734187
children 6847741e1f5f
comparison
equal deleted inserted replaced
162:06a98129b23f 163:80192edca30d
451 Print.eprefaces' [("Declaration", CorePrint.p_decl env all)]; 451 Print.eprefaces' [("Declaration", CorePrint.p_decl env all)];
452 NONE) 452 NONE)
453 in 453 in
454 case d of 454 case d of
455 L.DCon _ => NONE 455 L.DCon _ => NONE
456 | L.DDatatype _ => raise Fail "Monoize DDatatype"
456 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s, 457 | L.DVal (x, n, t, e, s) => SOME (Env.pushENamed env x n t (SOME e) s,
457 (L'.DVal (x, n, monoType env t, monoExp (env, St.empty) e, s), loc)) 458 (L'.DVal (x, n, monoType env t, monoExp (env, St.empty) e, s), loc))
458 | L.DValRec vis => 459 | L.DValRec vis =>
459 let 460 let
460 val env = foldl (fn ((x, n, t, e, s), env) => Env.pushENamed env x n t NONE s) env vis 461 val env = foldl (fn ((x, n, t, e, s), env) => Env.pushENamed env x n t NONE s) env vis