comparison src/elab_print.sml @ 825:7f871c03e3a1

Destructing local let, to the point where demo compiles
author Adam Chlipala <adamc@hcoop.net>
date Thu, 28 May 2009 12:07:05 -0400
parents e2780d2f4afc
children b2311dfb3158
comparison
equal deleted inserted replaced
824:be0988e46336 825:7f871c03e3a1
421 421
422 | EError => string "<ERROR>" 422 | EError => string "<ERROR>"
423 | EUnif (ref (SOME e)) => p_exp env e 423 | EUnif (ref (SOME e)) => p_exp env e
424 | EUnif _ => string "_" 424 | EUnif _ => string "_"
425 425
426 | ELet (ds, e) => 426 | ELet (ds, e, _) =>
427 let 427 let
428 val (dsp, env) = ListUtil.foldlMap 428 val (dsp, env) = ListUtil.foldlMap
429 (fn (d, env) => 429 (fn (d, env) =>
430 (p_edecl env d, 430 (p_edecl env d,
431 E.edeclBinds env d)) 431 E.edeclBinds env d))
454 454
455 and p_exp env = p_exp' false env 455 and p_exp env = p_exp' false env
456 456
457 and p_edecl env (dAll as (d, _)) = 457 and p_edecl env (dAll as (d, _)) =
458 case d of 458 case d of
459 EDVal vi => box [string "val", 459 EDVal (p, t, e) => box [string "val",
460 space, 460 space,
461 p_evali env vi] 461 p_pat env p,
462 space,
463 string ":",
464 space,
465 p_con env t,
466 space,
467 string "=",
468 space,
469 p_exp env e]
462 | EDValRec vis => 470 | EDValRec vis =>
463 let 471 let
464 val env = E.edeclBinds env dAll 472 val env = E.edeclBinds env dAll
465 in 473 in
466 box [string "val", 474 box [string "val",