Mercurial > urweb
comparison src/expl_util.sml @ 45:3c1ce1b4eb3d
Explifying functors
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 19 Jun 2008 17:11:24 -0400 |
parents | d16ef24de78b |
children | d609820c5834 |
comparison
equal
deleted
inserted
replaced
44:a9f3ce2d1b9b | 45:3c1ce1b4eb3d |
---|---|
351 sgi ctx si)) ctx sgis, | 351 sgi ctx si)) ctx sgis, |
352 fn sgis' => | 352 fn sgis' => |
353 (SgnConst sgis', loc)) | 353 (SgnConst sgis', loc)) |
354 | 354 |
355 | SgnVar _ => S.return2 sAll | 355 | SgnVar _ => S.return2 sAll |
356 | |
357 | SgnFun (m, n, s1, s2) => | |
358 S.bind2 (sg ctx s1, | |
359 fn s1' => | |
360 S.map2 (sg (bind (ctx, Str (m, s1'))) s2, | |
361 fn s2' => | |
362 (SgnFun (m, n, s1', s2'), loc))) | |
363 | SgnWhere (sgn, x, c) => | |
364 S.bind2 (sg ctx sgn, | |
365 fn sgn' => | |
366 S.map2 (con ctx c, | |
367 fn c' => | |
368 (SgnWhere (sgn', x, c'), loc))) | |
356 in | 369 in |
357 sg | 370 sg |
358 end | 371 end |
359 | 372 |
360 fun mapfold {kind, con, sgn_item, sgn} = | 373 fun mapfold {kind, con, sgn_item, sgn} = |