src/HOL/Library/simps_case_conv.ML
changeset 80634 a90ab1ea6458
parent 79733 3e30ca77ccfe
child 82317 231b6d8231c6
--- a/src/HOL/Library/simps_case_conv.ML	Sun Aug 04 13:14:33 2024 +0200
+++ b/src/HOL/Library/simps_case_conv.ML	Sun Aug 04 13:24:54 2024 +0200
@@ -46,7 +46,7 @@
   let
     fun ctr_count (ctr, T) = 
       let
-        val tyco = body_type T |> dest_Type |> fst
+        val tyco = dest_Type_name (body_type T)
         val info = Ctr_Sugar.ctr_sugar_of ctxt tyco
         val _ = if is_none info then error ("Pattern match on non-constructor constant " ^ ctr) else ()
       in