equal
deleted
inserted
replaced
89 fun arg1 n (con,_,args) = foldr cabs (expvar n) (argvars n args); |
89 fun arg1 n (con,_,args) = foldr cabs (expvar n) (argvars n args); |
90 fun when1 n m = if n = m then arg1 n else K (Constant "UU"); |
90 fun when1 n m = if n = m then arg1 n else K (Constant "UU"); |
91 |
91 |
92 fun app_var x = mk_appl (Constant "_var") [x, Variable "rhs"]; |
92 fun app_var x = mk_appl (Constant "_var") [x, Variable "rhs"]; |
93 fun app_pat x = mk_appl (Constant "_pat") [x]; |
93 fun app_pat x = mk_appl (Constant "_pat") [x]; |
94 fun args_list [] = Constant "Unity" |
94 fun args_list [] = Constant "_noargs" |
95 | args_list xs = foldr1 (app "_args") xs; |
95 | args_list xs = foldr1 (app "_args") xs; |
96 in |
96 in |
97 val case_trans = ParsePrintRule |
97 val case_trans = ParsePrintRule |
98 (app "_case_syntax" (Variable "x", foldr1 (app "_case2") (mapn case1 1 cons')), |
98 (app "_case_syntax" (Variable "x", foldr1 (app "_case2") (mapn case1 1 cons')), |
99 capp (Library.foldl capp (Constant (dnam^"_when"), mapn arg1 1 cons'), Variable "x")); |
99 capp (Library.foldl capp (Constant (dnam^"_when"), mapn arg1 1 cons'), Variable "x")); |