src/HOL/Tools/Function/function_common.ML
changeset 56254 a2dd9200854d
parent 56245 84fc7dfa3cd4
child 57959 1bfed12a7646
equal deleted inserted replaced
56253:83b3c110f22d 56254:a2dd9200854d
   345     val _ = null not_defined
   345     val _ = null not_defined
   346       orelse error ("No defining equations for function" ^
   346       orelse error ("No defining equations for function" ^
   347         plural " " "s " not_defined ^ commas_quote not_defined)
   347         plural " " "s " not_defined ^ commas_quote not_defined)
   348 
   348 
   349     fun check_sorts ((fname, fT), _) =
   349     fun check_sorts ((fname, fT), _) =
   350       Sorts.of_sort (Sign.classes_of (Proof_Context.theory_of ctxt)) (fT, HOLogic.typeS)
   350       Sorts.of_sort (Sign.classes_of (Proof_Context.theory_of ctxt)) (fT, @{sort type})
   351       orelse error (cat_lines
   351       orelse error (cat_lines
   352       ["Type of " ^ quote fname ^ " is not of sort " ^ quote "type" ^ ":",
   352       ["Type of " ^ quote fname ^ " is not of sort " ^ quote "type" ^ ":",
   353        Syntax.string_of_typ (Config.put show_sorts true ctxt) fT])
   353        Syntax.string_of_typ (Config.put show_sorts true ctxt) fT])
   354 
   354 
   355     val _ = map check_sorts fixes
   355     val _ = map check_sorts fixes