comparison src/core_util.sml @ 443:bd9ee9aeca2f

Especialize
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Oct 2008 16:58:54 -0400
parents ab3177746c78
children dfc8c991abd0
comparison
equal deleted inserted replaced
442:9095a95a1bf9 443:bd9ee9aeca2f
576 else 576 else
577 S.Continue (e, ())} k () of 577 S.Continue (e, ())} k () of
578 S.Return _ => true 578 S.Return _ => true
579 | S.Continue _ => false 579 | S.Continue _ => false
580 580
581 fun foldMap {kind, con, exp} s e =
582 case mapfold {kind = fn k => fn s => S.Continue (kind (k, s)),
583 con = fn c => fn s => S.Continue (con (c, s)),
584 exp = fn e => fn s => S.Continue (exp (e, s))} e s of
585 S.Continue v => v
586 | S.Return _ => raise Fail "CoreUtil.Exp.foldMap: Impossible"
587
581 end 588 end
582 589
583 structure Decl = struct 590 structure Decl = struct
584 591
585 datatype binder = datatype Exp.binder 592 datatype binder = datatype Exp.binder