src/Pure/Tools/codegen_funcgr.ML
changeset 21463 42dd50268c8b
parent 21387 5d3d340cb783
child 21915 4e63c55f4cb4
--- a/src/Pure/Tools/codegen_funcgr.ML	Wed Nov 22 10:21:17 2006 +0100
+++ b/src/Pure/Tools/codegen_funcgr.ML	Wed Nov 22 10:22:04 2006 +0100
@@ -41,7 +41,7 @@
   fun merge _ _ = Constgraph.empty;
   fun purge _ NONE _ = Constgraph.empty
     | purge _ (SOME cs) funcgr =
-        Constgraph.del_nodes ((Constgraph.all_succs funcgr 
+        Constgraph.del_nodes ((Constgraph.all_preds funcgr 
           o filter (can (Constgraph.get_node funcgr))) cs) funcgr;
 end);
 
@@ -186,8 +186,10 @@
   end;
 
 fun all_classops thy tyco class =
-  AxClass.params_of thy class
-  |> AList.make (fn c => CodegenConsts.disc_typ_of_classop thy (c, [Type (tyco, [])]))
+  try (AxClass.params_of_class thy) class
+  |> Option.map snd
+  |> these
+  |> map (fn (c, _) => (c, CodegenConsts.disc_typ_of_classop thy (c, [Type (tyco, [])])))
   |> map (CodegenConsts.norm_of_typ thy);
 
 fun instdefs_of thy insts =