diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-06-06 14:09:30 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-06-06 14:09:30 -0400 |
commit | 3ad616e1188527cfd92bf322d5884fa633d40208 (patch) | |
tree | 1d3da14055d91262a0e36315573406b564790fdc /src/elab_util.sml | |
parent | 07f80839011b33db760cdac421ccea6226b07111 (diff) |
List library additions; fix another substructure unification bug
Diffstat (limited to 'src/elab_util.sml')
-rw-r--r-- | src/elab_util.sml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/elab_util.sml b/src/elab_util.sml index 8082cb1e..e7985026 100644 --- a/src/elab_util.sml +++ b/src/elab_util.sml @@ -280,6 +280,13 @@ fun foldB {kind, con, bind} ctx st c = 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 |