comparison src/expl_util.sml @ 338:e976b187d73a

SQL sequences
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 11:02:18 -0400
parents 3aa010e97db9
children 075b36dbb1a4
comparison
equal deleted inserted replaced
337:18d5affa790d 338:e976b187d73a
414 (SgiSgn (x, n, s'), loc)) 414 (SgiSgn (x, n, s'), loc))
415 | SgiTable (tn, x, n, c) => 415 | SgiTable (tn, x, n, c) =>
416 S.map2 (con ctx c, 416 S.map2 (con ctx c,
417 fn c' => 417 fn c' =>
418 (SgiTable (tn, x, n, c'), loc)) 418 (SgiTable (tn, x, n, c'), loc))
419 | SgiSequence _ => S.return2 siAll
419 420
420 and sg ctx s acc = 421 and sg ctx s acc =
421 S.bindP (sg' ctx s acc, sgn ctx) 422 S.bindP (sg' ctx s acc, sgn ctx)
422 423
423 and sg' ctx (sAll as (s, loc)) = 424 and sg' ctx (sAll as (s, loc)) =
436 | SgiVal _ => ctx 437 | SgiVal _ => ctx
437 | SgiStr (x, _, sgn) => 438 | SgiStr (x, _, sgn) =>
438 bind (ctx, Str (x, sgn)) 439 bind (ctx, Str (x, sgn))
439 | SgiSgn (x, _, sgn) => 440 | SgiSgn (x, _, sgn) =>
440 bind (ctx, Sgn (x, sgn)) 441 bind (ctx, Sgn (x, sgn))
441 | SgiTable _ => ctx, 442 | SgiTable _ => ctx
443 | SgiSequence _ => ctx,
442 sgi ctx si)) ctx sgis, 444 sgi ctx si)) ctx sgis,
443 fn sgis' => 445 fn sgis' =>
444 (SgnConst sgis', loc)) 446 (SgnConst sgis', loc))
445 447
446 | SgnVar _ => S.return2 sAll 448 | SgnVar _ => S.return2 sAll