src/Tools/Code/code_printer.ML
changeset 81521 1bfad73ab115
parent 80859 96c895da5d8c
equal deleted inserted replaced
81520:878bc24681d9 81521:1bfad73ab115
   186     fun fillup_param _ (_, SOME v) = v
   186     fun fillup_param _ (_, SOME v) = v
   187       | fillup_param x (i, NONE) = x ^ string_of_int i;
   187       | fillup_param x (i, NONE) = x ^ string_of_int i;
   188     val fished1 = fold (map2 fish_param) lhss (replicate (length (hd lhss)) NONE);
   188     val fished1 = fold (map2 fish_param) lhss (replicate (length (hd lhss)) NONE);
   189     val x = singleton (Name.variant_list (map_filter I fished1)) "x";
   189     val x = singleton (Name.variant_list (map_filter I fished1)) "x";
   190     val fished2 = map_index (fillup_param x) fished1;
   190     val fished2 = map_index (fillup_param x) fished1;
   191     val (fished3, _) = fold_map Name.variant fished2 Name.context;
   191     val fished3 = Name.variants Name.context fished2;
   192     val vars' = intro_vars fished3 vars;
   192     val vars' = intro_vars fished3 vars;
   193   in map (lookup_var vars') fished3 end;
   193   in map (lookup_var vars') fished3 end;
   194 
   194 
   195 fun intro_base_names no_syntax deresolve =
   195 fun intro_base_names no_syntax deresolve =
   196   map_filter (fn name => if no_syntax name then
   196   map_filter (fn name => if no_syntax name then