Mercurial > urweb
diff src/elab_util.sml @ 839:b2413e4dd109
List library additions; fix another substructure unification bug
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 06 Jun 2009 14:09:30 -0400 |
parents | 78504d97410b |
children | b2311dfb3158 |
line wrap: on
line diff
--- a/src/elab_util.sml Tue Jun 02 19:28:25 2009 -0400 +++ b/src/elab_util.sml Sat Jun 06 14:09:30 2009 -0400 @@ -280,6 +280,13 @@ S.Continue (_, st) => st | S.Return _ => raise Fail "ElabUtil.Con.foldB: Impossible" +fun fold {kind, con} st c = + case mapfoldB {kind = fn () => fn k => fn st => S.Continue (k, kind (k, st)), + con = fn () => fn c => fn st => S.Continue (c, con (c, st)), + bind = fn ((), _) => ()} () c st of + S.Continue (_, st) => st + | S.Return _ => raise Fail "ElabUtil.Con.fold: Impossible" + end structure Exp = struct