--- a/src/Pure/Tools/class_package.ML Mon Oct 23 11:05:33 2006 +0200
+++ b/src/Pure/Tools/class_package.ML Mon Oct 23 11:17:24 2006 +0200
@@ -577,6 +577,7 @@
fun wrap_add_instance_sort (class, sort) thy =
(if forall (is_some o lookup_class_data thy) (Sign.read_sort thy sort)
+ andalso (is_some o lookup_class_data thy) (Sign.intern_class thy class)
then instance_sort else axclass_instance_sort) (class, sort) thy;
val class_subP = P.name -- Scan.repeat (P.$$$ "+" |-- P.name) >> (op ::);
--- a/src/Pure/Tools/codegen_serializer.ML Mon Oct 23 11:05:33 2006 +0200
+++ b/src/Pure/Tools/codegen_serializer.ML Mon Oct 23 11:17:24 2006 +0200
@@ -909,7 +909,7 @@
fun deriving_show tyco =
let
fun deriv tycos tyco = member (op =) tycos tyco orelse
- case Graph.get_node code tyco
+ case the_default CodegenThingol.Bot (try (Graph.get_node code) tyco)
of CodegenThingol.Bot => true
| CodegenThingol.Datatype (_, cs) => forall (deriv' (tyco :: tycos))
(maps snd cs)