comparison src/mono_util.sml @ 2252:e843a04499d4

Revert to revision 2222.
author Ziv Scully <ziv@mit.edu>
date Mon, 21 Sep 2015 10:16:55 -0400
parents 25874084bf1f
children 8428c534913a
comparison
equal deleted inserted replaced
2251:25874084bf1f 2252:e843a04499d4
693 693
694 fun mapfoldB (all as {bind, ...}) = 694 fun mapfoldB (all as {bind, ...}) =
695 let 695 let
696 val mfd = Decl.mapfoldB all 696 val mfd = Decl.mapfoldB all
697 697
698 fun mff ctx (file : file) = 698 fun mff ctx (ds, ps) =
699 case #decls file of 699 case ds of
700 nil => S.return2 {decls = nil, sideInfo = #sideInfo file} 700 nil => S.return2 (nil, ps)
701 | d :: ds' => 701 | d :: ds' =>
702 S.bind2 (mfd ctx d, 702 S.bind2 (mfd ctx d,
703 fn d' => 703 fn d' =>
704 let 704 let
705 val ctx' = 705 val ctx' =
734 | DStyle _ => ctx 734 | DStyle _ => ctx
735 | DTask _ => ctx 735 | DTask _ => ctx
736 | DPolicy _ => ctx 736 | DPolicy _ => ctx
737 | DOnError _ => ctx 737 | DOnError _ => ctx
738 in 738 in
739 S.map2 (mff ctx' {decls = ds', sideInfo = #sideInfo file}, 739 S.map2 (mff ctx' (ds', ps),
740 fn {decls = ds', ...} => 740 fn (ds', _) =>
741 {decls = d' :: ds', sideInfo = #sideInfo file}) 741 (d' :: ds', ps))
742 end) 742 end)
743 in 743 in
744 mff 744 mff
745 end 745 end
746 746
789 | DJavaScript _ => count 789 | DJavaScript _ => count
790 | DCookie _ => count 790 | DCookie _ => count
791 | DStyle _ => count 791 | DStyle _ => count
792 | DTask _ => count 792 | DTask _ => count
793 | DPolicy _ => count 793 | DPolicy _ => count
794 | DOnError _ => count) 0 (#decls f) 794 | DOnError _ => count) 0 (#1 f)
795 795
796 fun appLoc f (fl : file) = 796 fun appLoc f (fl : file) =
797 let 797 let
798 val eal = Exp.appLoc f 798 val eal = Exp.appLoc f
799 799
820 | PolInsert e1 => eal e1 820 | PolInsert e1 => eal e1
821 | PolDelete e1 => eal e1 821 | PolDelete e1 => eal e1
822 | PolUpdate e1 => eal e1 822 | PolUpdate e1 => eal e1
823 | PolSequence e1 => eal e1 823 | PolSequence e1 => eal e1
824 in 824 in
825 app appl (#decls fl) 825 app appl (#1 fl)
826 end 826 end
827 827
828 end 828 end
829 829
830 end 830 end