src/HOL/Tools/metis_tools.ML
changeset 26939 1035c89b4c02
parent 26931 aa226d8405a8
child 26957 e3f04fdd994d
equal deleted inserted replaced
26938:64e850c3da9e 26939:1035c89b4c02
   164 
   164 
   165   fun apply_list rator nargs rands =
   165   fun apply_list rator nargs rands =
   166     let val trands = terms_of rands
   166     let val trands = terms_of rands
   167     in  if length trands = nargs then Term (list_comb(rator, trands))
   167     in  if length trands = nargs then Term (list_comb(rator, trands))
   168         else error
   168         else error
   169           ("apply_list: wrong number of arguments: " ^ Sign.string_of_term CPure.thy rator ^
   169           ("apply_list: wrong number of arguments: " ^ Syntax.string_of_term_global CPure.thy rator ^
   170             " expected " ^
   170             " expected " ^ Int.toString nargs ^
   171             Int.toString nargs ^ " received " ^ commas (map (Sign.string_of_term CPure.thy) trands))
   171             " received " ^ commas (map (Syntax.string_of_term_global CPure.thy) trands))
   172     end;
   172     end;
   173 
   173 
   174 (*Instantiate constant c with the supplied types, but if they don't match its declared
   174 (*Instantiate constant c with the supplied types, but if they don't match its declared
   175   sort constraints, replace by a general type.*)
   175   sort constraints, replace by a general type.*)
   176 fun const_of ctxt (c,Ts) =  Const (c, dummyT)
   176 fun const_of ctxt (c,Ts) =  Const (c, dummyT)