more appropriate notion of emptiness
authorhaftmann
Sun, 06 May 2018 18:20:25 +0000
changeset 68098 e2bb1d95cbd0
parent 68097 5f3cffe16311
child 68099 305f9f3edf05
more appropriate notion of emptiness
src/Pure/Isar/class.ML
--- a/src/Pure/Isar/class.ML	Sun May 06 23:59:14 2018 +0100
+++ b/src/Pure/Isar/class.ML	Sun May 06 18:20:25 2018 +0000
@@ -196,13 +196,13 @@
         ([Pretty.keyword1 "class", Pretty.brk 1,
           Name_Space.pretty ctxt class_space class, Pretty.str ":", Pretty.fbrk,
           Pretty.block [Pretty.str "supersort: ", prt_supersort class]] @
-          (case try (Axclass.get_info thy) class of
-            NONE => []
-          | SOME {params, ...} =>
+          (case (these o Option.map #params o try (Axclass.get_info thy)) class of
+            [] => []
+          | params =>
               [Pretty.fbrk, Pretty.big_list "parameters:" (map prt_param params)]) @
-          (case Symtab.lookup arities class of
-            NONE => []
-          | SOME ars =>
+          (case (these o Symtab.lookup arities) class of
+            [] => []
+          | ars =>
               [Pretty.fbrk, Pretty.big_list "instances:"
                 (map (prt_arity class) (sort (Name_Space.extern_ord ctxt type_space) ars))]));
   in