Use lookup_size rather than Datatype.get_info in is_poly to avoid
authorberghofe
Tue, 24 Jan 2012 16:00:51 +0100
changeset 46328 fd21bbcbe61b
parent 46327 ecda23528833
child 46330 2ddc00f8ad7c
Use lookup_size rather than Datatype.get_info in is_poly to avoid incorrect results for datatypes on which no size function is defined
src/HOL/Tools/Function/size.ML
--- a/src/HOL/Tools/Function/size.ML	Tue Jan 24 09:13:24 2012 +0100
+++ b/src/HOL/Tools/Function/size.ML	Tue Jan 24 16:00:51 2012 +0100
@@ -41,7 +41,7 @@
     | SOME t => t);
 
 fun is_poly thy (Datatype.DtType (name, dts)) =
-      (case Datatype.get_info thy name of
+      (case lookup_size thy name of
          NONE => false
        | SOME _ => exists (is_poly thy) dts)
   | is_poly _ _ = true;