comparison src/core_util.sml @ 488:5521bb0b4014

Get preliminary ThreadedBlog working
author Adam Chlipala <adamc@hcoop.net>
date Tue, 11 Nov 2008 15:12:24 -0500
parents 685b41e85634
children ae03d09043c1
comparison
equal deleted inserted replaced
487:33d5bd69da00 488:5521bb0b4014
760 case mapfold {kind = fn k => fn s => S.Continue (kind (k, s)), 760 case mapfold {kind = fn k => fn s => S.Continue (kind (k, s)),
761 con = fn c => fn s => S.Continue (con (c, s)), 761 con = fn c => fn s => S.Continue (con (c, s)),
762 exp = fn e => fn s => S.Continue (exp (e, s))} e s of 762 exp = fn e => fn s => S.Continue (exp (e, s))} e s of
763 S.Continue v => v 763 S.Continue v => v
764 | S.Return _ => raise Fail "CoreUtil.Exp.foldMap: Impossible" 764 | S.Return _ => raise Fail "CoreUtil.Exp.foldMap: Impossible"
765
766 fun foldMapB {kind, con, exp, bind} ctx s e =
767 case mapfoldB {kind = fn k => fn s => S.Continue (kind (k, s)),
768 con = fn ctx => fn c => fn s => S.Continue (con (ctx, c, s)),
769 exp = fn ctx => fn e => fn s => S.Continue (exp (ctx, e, s)),
770 bind = bind} ctx e s of
771 S.Continue v => v
772 | S.Return _ => raise Fail "CoreUtil.Exp.foldMapB: Impossible"
765 773
766 end 774 end
767 775
768 structure Decl = struct 776 structure Decl = struct
769 777