comparison src/mono_util.sml @ 609:56aaa1941dad

First gimpy RPC
author Adam Chlipala <adamc@hcoop.net>
date Sun, 15 Feb 2009 10:32:50 -0500
parents 330a7de47914
children 5891f47d7cff
comparison
equal deleted inserted replaced
608:330a7de47914 609:56aaa1941dad
348 | ESignalSource e => 348 | ESignalSource e =>
349 S.map2 (mfe ctx e, 349 S.map2 (mfe ctx e,
350 fn e' => 350 fn e' =>
351 (ESignalSource e', loc)) 351 (ESignalSource e', loc))
352 352
353 | EServerCall (n, es, ek) => 353 | EServerCall (n, es, ek, t) =>
354 S.bind2 (ListUtil.mapfold (fn e => mfe ctx e) es, 354 S.bind2 (ListUtil.mapfold (fn e => mfe ctx e) es,
355 fn es' => 355 fn es' =>
356 S.map2 (mfe ctx ek, 356 S.bind2 (mfe ctx ek,
357 fn ek' => 357 fn ek' =>
358 (EServerCall (n, es', ek'), loc))) 358 S.map2 (mft t,
359 fn t' =>
360 (EServerCall (n, es', ek', t'), loc))))
359 in 361 in
360 mfe 362 mfe
361 end 363 end
362 364
363 fun mapfold {typ = fc, exp = fe} = 365 fun mapfold {typ = fc, exp = fe} =
441 in 443 in
442 S.map2 (ListUtil.mapfold (mfvi ctx') vis, 444 S.map2 (ListUtil.mapfold (mfvi ctx') vis,
443 fn vis' => 445 fn vis' =>
444 (DValRec vis', loc)) 446 (DValRec vis', loc))
445 end 447 end
446 | DExport (ek, s, n, ts) => 448 | DExport (ek, s, n, ts, t) =>
447 S.map2 (ListUtil.mapfold mft ts, 449 S.bind2 (ListUtil.mapfold mft ts,
448 fn ts' => 450 fn ts' =>
449 (DExport (ek, s, n, ts'), loc)) 451 S.map2 (mft t,
452 fn t' =>
453 (DExport (ek, s, n, ts', t'), loc)))
450 | DTable _ => S.return2 dAll 454 | DTable _ => S.return2 dAll
451 | DSequence _ => S.return2 dAll 455 | DSequence _ => S.return2 dAll
452 | DDatabase _ => S.return2 dAll 456 | DDatabase _ => S.return2 dAll
453 | DJavaScript _ => S.return2 dAll 457 | DJavaScript _ => S.return2 dAll
454 458