src/HOL/Import/import_rule.ML
changeset 56239 17df7145a871
parent 50214 67fb9a168d10
child 56256 1e01c159e7d9
equal deleted inserted replaced
56237:69a9dfe71aed 56239:17df7145a871
   170 
   170 
   171 fun def' constname rhs thy =
   171 fun def' constname rhs thy =
   172   let
   172   let
   173     val rhs = term_of rhs
   173     val rhs = term_of rhs
   174     val typ = type_of rhs
   174     val typ = type_of rhs
   175     val thy1 = Sign.add_consts_i [(Binding.name constname, typ, NoSyn)] thy
   175     val thy1 = Sign.add_consts [(Binding.name constname, typ, NoSyn)] thy
   176     val eq = Logic.mk_equals (Const (Sign.intern_const thy1 constname, typ), rhs)
   176     val eq = Logic.mk_equals (Const (Sign.intern_const thy1 constname, typ), rhs)
   177     val (thms, thy2) = Global_Theory.add_defs false
   177     val (thms, thy2) = Global_Theory.add_defs false
   178       [((Binding.suffix_name "_hldef" (Binding.name constname), eq), [])] thy1
   178       [((Binding.suffix_name "_hldef" (Binding.name constname), eq), [])] thy1
   179     val def_thm = freezeT (hd thms)
   179     val def_thm = freezeT (hd thms)
   180   in
   180   in