src/Pure/Tools/codegen_names.ML
changeset 21931 314f9e2a442c
parent 21927 9677abe5d374
child 22034 44ab6c04b3dc
equal deleted inserted replaced
21930:918fb0fb5c72 21931:314f9e2a442c
   152   in case thy_of thy
   152   in case thy_of thy
   153    of SOME thy => Context.theory_name thy
   153    of SOME thy => Context.theory_name thy
   154     | NONE => error (errmsg x) end;
   154     | NONE => error (errmsg x) end;
   155 
   155 
   156 fun thyname_of_class thy =
   156 fun thyname_of_class thy =
   157   thyname_of thy (fn thy => member (op =) (Sign.classes thy))
   157   thyname_of thy (fn thy => member (op =) (Sign.all_classes thy))
   158     (fn class => "thyname_of_class: no such class: " ^ quote class);
   158     (fn class => "thyname_of_class: no such class: " ^ quote class);
   159 
   159 
   160 fun thyname_of_classrel thy =
   160 fun thyname_of_classrel thy =
   161   thyname_of thy (fn thy => fn (class1, class2) => Sign.subsort thy ([class1], [class2]))
   161   thyname_of thy (fn thy => fn (class1, class2) => Sign.subsort thy ([class1], [class2]))
   162     (fn (class1, class2) => "thyname_of_classrel: no such classrel: " ^ quote class1 ^ " in " ^ quote class2);
   162     (fn (class1, class2) => "thyname_of_classrel: no such classrel: " ^ quote class1 ^ " in " ^ quote class2);