Mercurial > urweb
comparison src/core_util.sml @ 461:5c9606deacb6
Cookies through shake2
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 10:48:02 -0500 |
parents | 787d4931fb07 |
children | ffa18975e661 |
comparison
equal
deleted
inserted
replaced
460:d34834af4512 | 461:5c9606deacb6 |
---|---|
654 (DValRec vis', loc)) | 654 (DValRec vis', loc)) |
655 end | 655 end |
656 | DExport _ => S.return2 dAll | 656 | DExport _ => S.return2 dAll |
657 | DTable (x, n, c, s) => | 657 | DTable (x, n, c, s) => |
658 S.map2 (mfc ctx c, | 658 S.map2 (mfc ctx c, |
659 fn c' => | 659 fn c' => |
660 (DTable (x, n, c', s), loc)) | 660 (DTable (x, n, c', s), loc)) |
661 | DSequence _ => S.return2 dAll | 661 | DSequence _ => S.return2 dAll |
662 | DDatabase _ => S.return2 dAll | 662 | DDatabase _ => S.return2 dAll |
663 | DCookie (x, n, c, s) => | |
664 S.map2 (mfc ctx c, | |
665 fn c' => | |
666 (DCookie (x, n, c', s), loc)) | |
663 | 667 |
664 and mfvi ctx (x, n, t, e, s) = | 668 and mfvi ctx (x, n, t, e, s) = |
665 S.bind2 (mfc ctx t, | 669 S.bind2 (mfc ctx t, |
666 fn t' => | 670 fn t' => |
667 S.map2 (mfe ctx e, | 671 S.map2 (mfe ctx e, |
753 val t = (CFfi ("Basis", "sql_sequence"), #2 d') | 757 val t = (CFfi ("Basis", "sql_sequence"), #2 d') |
754 in | 758 in |
755 bind (ctx, NamedE (x, n, t, NONE, s)) | 759 bind (ctx, NamedE (x, n, t, NONE, s)) |
756 end | 760 end |
757 | DDatabase _ => ctx | 761 | DDatabase _ => ctx |
762 | DCookie (x, n, c, s) => | |
763 let | |
764 val t = (CApp ((CFfi ("Basis", "http_cookie"), #2 d'), c), #2 d') | |
765 in | |
766 bind (ctx, NamedE (x, n, t, NONE, s)) | |
767 end | |
758 in | 768 in |
759 S.map2 (mff ctx' ds', | 769 S.map2 (mff ctx' ds', |
760 fn ds' => | 770 fn ds' => |
761 d' :: ds') | 771 d' :: ds') |
762 end) | 772 end) |
805 | DVal (_, n, _, _, _) => Int.max (n, count) | 815 | DVal (_, n, _, _, _) => Int.max (n, count) |
806 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis | 816 | DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis |
807 | DExport _ => count | 817 | DExport _ => count |
808 | DTable (_, n, _, _) => Int.max (n, count) | 818 | DTable (_, n, _, _) => Int.max (n, count) |
809 | DSequence (_, n, _) => Int.max (n, count) | 819 | DSequence (_, n, _) => Int.max (n, count) |
810 | DDatabase _ => count) 0 | 820 | DDatabase _ => count |
821 | DCookie (_, n, _, _) => Int.max (n, count)) 0 | |
811 | 822 |
812 end | 823 end |
813 | 824 |
814 end | 825 end |