src/HOL/Tools/recfun_codegen.ML
changeset 15574 b1d1b5bfc464
parent 15570 8d8c70b41bab
child 15700 970e0293dfb3
equal deleted inserted replaced
15573:cf53c2dcf440 15574:b1d1b5bfc464
   126                let
   126                let
   127                  val eqs'' = map (dest_eq o prop_of)
   127                  val eqs'' = map (dest_eq o prop_of)
   128                    (List.concat (map (get_equations thy) cs));
   128                    (List.concat (map (get_equations thy) cs));
   129                  val (gr3, fundef') = mk_fundef "" "fun "
   129                  val (gr3, fundef') = mk_fundef "" "fun "
   130                    (Graph.add_edge (dname, dep)
   130                    (Graph.add_edge (dname, dep)
   131                      (Library.foldr (uncurry Graph.new_node) (map (fn k =>
   131                      (foldr (uncurry Graph.new_node) (Graph.del_nodes xs gr2)
   132                        (k, (SOME (EQN ("", dummyT, dname)), ""))) xs,
   132                        (map (fn k =>
   133                          Graph.del_nodes xs gr2))) eqs''
   133                          (k, (SOME (EQN ("", dummyT, dname)), ""))) xs))) eqs''
   134                in put_code fundef' gr3 end
   134                in put_code fundef' gr3 end
   135              else gr2)
   135              else gr2)
   136          end
   136          end
   137      | SOME (SOME (EQN (_, _, s)), _) =>
   137      | SOME (SOME (EQN (_, _, s)), _) =>
   138          if s = "" then
   138          if s = "" then