Mercurial > urweb
comparison src/cjr_print.sml @ 1104:72670131dace
Basis.serialize; separate file for mhash; run transactional finishers in reverse order; set needs_sig properly
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 31 Dec 2009 11:41:57 -0500 |
parents | db52c32dbe42 |
children | 631a3597c065 |
comparison
equal
deleted
inserted
replaced
1103:2f42c61b8d0a | 1104:72670131dace |
---|---|
2182 [("1", t'), ("2", _)] => flatFields [] t' | 2182 [("1", t'), ("2", _)] => flatFields [] t' |
2183 | _ => raise Fail "CjrPrint: Bad struct for TList" | 2183 | _ => raise Fail "CjrPrint: Bad struct for TList" |
2184 end | 2184 end |
2185 | _ => NONE | 2185 | _ => NONE |
2186 | 2186 |
2187 val fields = foldl (fn ((ek, _, _, ts, _, _), fields) => | 2187 val fields = foldl (fn ((ek, _, _, ts, _, _, _), fields) => |
2188 case ek of | 2188 case ek of |
2189 Link => fields | 2189 Link => fields |
2190 | Rpc _ => fields | 2190 | Rpc _ => fields |
2191 | Action eff => | 2191 | Action eff => |
2192 case List.nth (ts, length ts - 2) of | 2192 case List.nth (ts, length ts - 2) of |
2478 unurlify true env t, | 2478 unurlify true env t, |
2479 string ";", | 2479 string ";", |
2480 newline] | 2480 newline] |
2481 end | 2481 end |
2482 | 2482 |
2483 fun p_page (ek, s, n, ts, ran, side) = | 2483 fun p_page (ek, s, n, ts, ran, side, tellSig) = |
2484 let | 2484 let |
2485 val (ts, defInputs, inputsVar, fields) = | 2485 val (ts, defInputs, inputsVar, fields) = |
2486 case ek of | 2486 case ek of |
2487 Core.Link => (List.take (ts, length ts - 1), string "", string "", NONE) | 2487 Core.Link => (List.take (ts, length ts - 1), string "", string "", NONE) |
2488 | Core.Rpc _ => (List.take (ts, length ts - 1), string "", string "", NONE) | 2488 | Core.Rpc _ => (List.take (ts, length ts - 1), string "", string "", NONE) |
2610 ServerAndPullAndPush => "1" | 2610 ServerAndPullAndPush => "1" |
2611 | _ => "0"), | 2611 | _ => "0"), |
2612 string ");", | 2612 string ");", |
2613 newline, | 2613 newline, |
2614 string "uw_set_needs_sig(ctx, ", | 2614 string "uw_set_needs_sig(ctx, ", |
2615 string (if couldWrite ek then | 2615 string (if tellSig then |
2616 "1" | 2616 "1" |
2617 else | 2617 else |
2618 "0"), | 2618 "0"), |
2619 string ");", | 2619 string ");", |
2620 newline, | 2620 newline, |