Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
838:5154a047c6bc | 839:b2413e4dd109 |
---|---|
277 case mapfoldB {kind = fn ctx => fn k => fn st => S.Continue (k, kind (ctx, k, st)), | 277 case mapfoldB {kind = fn ctx => fn k => fn st => S.Continue (k, kind (ctx, k, st)), |
278 con = fn ctx => fn c => fn st => S.Continue (c, con (ctx, c, st)), | 278 con = fn ctx => fn c => fn st => S.Continue (c, con (ctx, c, st)), |
279 bind = bind} ctx c st of | 279 bind = bind} ctx c st of |
280 S.Continue (_, st) => st | 280 S.Continue (_, st) => st |
281 | S.Return _ => raise Fail "ElabUtil.Con.foldB: Impossible" | 281 | S.Return _ => raise Fail "ElabUtil.Con.foldB: Impossible" |
282 | |
283 fun fold {kind, con} st c = | |
284 case mapfoldB {kind = fn () => fn k => fn st => S.Continue (k, kind (k, st)), | |
285 con = fn () => fn c => fn st => S.Continue (c, con (c, st)), | |
286 bind = fn ((), _) => ()} () c st of | |
287 S.Continue (_, st) => st | |
288 | S.Return _ => raise Fail "ElabUtil.Con.fold: Impossible" | |
282 | 289 |
283 end | 290 end |
284 | 291 |
285 structure Exp = struct | 292 structure Exp = struct |
286 | 293 |